In some embodiments, the diffusion barrier layer 14 may help to prevent metal ions such as copper ions, silver ions, aluminum ions or the like from diffusion from the switching layer 16 into the diffusion barrier layer 14 and the bottom electrode 12, and may help to prevent active metal ions from diffusion from the diffusion barrier layer 14 and the bottom electrode 12 into the switching layer 16. In some embodiments, the diffusion barrier layer 14 may help to retard diffusion of active metal ions from the switching layer 16 into the diffusion barrier layer 14 and the bottom electrode 12, and may help to retard diffusion of active metal ions from the diffusion barrier layer 14 and the bottom electrode 12 into the switching layer 16.
When the semiconductor device 1 is a CBRAM, the diffusion barrier layer 14 is configured as an active metal diffusion barrier layer. Examples of the material for the active metal diffusion barrier layer may include metal, metal nitride, metal alloy, or a combination thereof. By way of examples, the metal for the active metal diffusion barrier layer may include palladium (Pd), tantalum (Ta), hafnium (Hf), zirconium (Zr), niobium (Nb), cobalt (Co), ruthenium (Ru) or a combination thereof. The metal nitride for the active metal diffusion barrier layer may include titanium nitride, tantalum nitride, tungsten nitride, tantalum tungsten nitride, ruthenium titanium nitride, ruthenium tantalum nitride, tantalum silicon nitride, tantalum germanium oxynitride (Ta—Ge—(O)N) or a combination thereof. The metal alloy for the active metal diffusion barrier layer may include nickel chromium alloy.