As shown in FIG. 6C, a bottom electrode 12 is formed over the dielectric layer 34, and electrically connected to the exposed bottom metallization layer 321. In some embodiments, the bottom electrode 12 may be formed to have a substantially planar upper surface. Subsequently, a diffusion barrier layer 14, a switching layer 16 and a top electrode 22 may be formed over the bottom electrode 12. In some embodiments, an ion reservoir region 18 may be formed over the switching layer 16 prior to formation of the top electrode 22. In some embodiments, a capping layer 20 may be formed over the ion reservoir region 18 prior to formation of the top electrode 22. The diffusion barrier layer 14, the switching layer 16, the ion reservoir region 18, the capping layer 20 and the top electrode 22 may have substantially planar upper surface as the bottom electrode 12. The materials for the bottom electrode 12, the diffusion barrier layer 14, the switching layer 16, the capping layer 20 and the top electrode 22 may be the same as the aforementioned embodiments, and are not redundantly described.
As shown in FIG. 6D, a mask layer 36 is formed over the top electrode 22. The mask layer 36 covers a portion of the top electrode 22, and exposes the rest of the top electrode 22. In some embodiments, the mask layer 36 may include a photoresist layer, but is not limited thereto.