Diode connected mos transistor