We have been asked to create a Ramp(sawtooth) Wave out of Square wave by using PMOS, NMOS, Capacitor and a Square Waveform. I tried a couple of configuration in LTSpice but to no avail. The hint says capacitor charges linearly but I then how does the voltage go to 0 in a matter of few ns?