Process integration and logic applications of SiOx based resistive memory