I am trying to model Buck Converter in Verilog.
MOSFET model which I have designed has 3 inout ports - Source, Gate and Drain.
During charging, High side MOSFET is ON, with the Inductor being charged.
Drain terminal gets input voltage (12V)
I have given PWM to the gate of MOSFET (When High side MOSFET is ON, Low side is off and vice versa).
But I am not able to make out what is the voltage at Source terminal of High side during charging ?
Is the voltage at Source is same as Voltage at the Drain (Input voltage) ?
Please help me to understand the basics.
Thanks and regards,