on a surface of a semiconductor substrate , an epitaxial layer of a conductivity type opposite to a conductivity type of the semiconductor substrate is formed , trenches are formed in portions other than a portion serving as a resistor , and the trenches are filled with an insulating film to three - dimensionally form u - shaped resistors which are separated from each other .