A semiconductor device includes a semiconductor substrate, a lower wiring
layer formed on the semiconductor substrate, a first interlayer
insulating film formed on the lower wiring layer and including a first
upper surface and a second upper surface, the first upper surface being
higher than the second upper surface relative to a surface of the
semiconductor substrate, a contact plug formed in the interlayer
insulating film and including a first bottom surface contacting to the
lower wiring layer, a third upper surface flush with the second upper
surface and a fourth upper surface flush with the first upper surface, an
upper wiring layer formed on the first and third upper surfaces and
including a first side surface and a second side surface opposite to the
first side surface, and a second interlayer insulating film formed on the
second and fourth upper surfaces.