
Finish installing magic and set up the sky130 pdk with the make command, then install energy spice via installers to handle dependencies, verify in a terminal, and complete spice installation.
Review the installed Xschem setup and Sky130 PDK, create a new library, and patch configurations to integrate Sky130 into the scheme for spice-based verification.
Simulate and analyze EN, INP and IHyst inputs in the Sky130 analog comparator, examining a 3.3 V to 0 V input, a 0.8–1.8 V triangle waveform, and time-based hysteresis.
Explore how changing differential and common mode voltages affect hysteresis and output in an analog comparator, highlighting rising versus falling edge behavior and design tradeoffs within spec.
A comparator is a device that compares two analog inputs and outputs a digital signal indicating which input is larger. So it has two analog input terminals and one binary digital output. When the difference between two analog input signals approach zero, noise on the inputs will cause spurious switching of digital output. This rapid change in output due to noise can be prevented by hysteresis. Hysteresis is switching the output high or low at different input signal levels. In place of one switching point, hysteresis introduces two: one for rising edge, and one for falling edge of voltage or current. The difference between the higher-level trip value (VH) and the lower-level trip value (VL) equals the hysteresis voltage (HYST).
A comparator can be divided into three distinctive pieces – a front-end differential amplifier, amplifier stage and output stage.
This comparator consists of
Front-end differential amplifier
Amplifier of the output from front-end differential sage
NAND gate to act as buffer as well as incorporate the enable pin
Inverter to act as final buffer before output. The NAND and Inverter improves the slew and provides a little gain.
Positive feedback differential set-up.
Various Comparator specifications are listed below:
Propagation Delay -The time difference between the input crossing the reference voltage and the output changing the logic state. Generally, comparators are fast
Input Offset -The difference between the input voltages at the instance where output voltage equals zero volts
Gain–Ideal Comparator has infinite gain and output jumps from low to high at a specific difference in input voltage. Ideal comparators will have a linear transfer curve.
There are multiple other parameters like output swing, Output type, input and output current and impedance but we will focus on above including hysteresis.
This webinar will discuss all design, layout and specification details using ngspice, Xschem and Magic