VSD Intern – Analog Comparator Design using Sky130

Comparator Circuit design and layout using Sky130 foundry PDKs


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

  1. Front-end differential amplifier
  2. Amplifier of the output from front-end differential sage
  3. NAND gate to act as buffer as well as incorporate the enable pin
  4. Inverter to act as final buffer before output. The NAND and Inverter improves the slew and provides a little gain.
  5. 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


  1. Introduction
  2. Tool Installation and Testing (LIVE Tabs)
    • Steps to Install MAGIC
    • Steps to install Sky130 PDK and NGSpic
    • Steps to configure Xschem with Sky130 PD
    • Final Steps to patch Sky130 PDK with NGSpice and Xschem
    • Xschem testing with Sky130 PDKs
  3. Comparator Circuit design and Layout (LIVE Labs)
    • Introduction To Comparator Circuit Components And Pre-layout Simulation
    • Hysteresis And Simulation Stimulus
    • Review EN, INP and IHyst Inputs
    • Review differential stage Output- Vdiff
    • Review Amplifier Output
    • Impact Of Changing Differential Voltage On Common Mod
    • Circuit To Layout Mapping
    • Transistor Selection And Tech File Details
  4. Conclusion: Post-Layout Simulation, Issues And FutureWork

Audience Profile

  • Beginner who is curious to know about circuit design and layout
  • Physical Design Professionals curious to know about IP design


  • VSD - Circuit design and SPICE simulations
  • VSD - Custom layout
  • VSD Intern - Analog Bandgap Reference design using Sky130

What you'll learn

  • Basics of Analog comparator Circuit design and layout
  • Integrate Sky130 foundry PDKs with comparator circuit design
  • Basics of comparator hysteresis characteristics

Buy the course :


Presentation of the video courses powered by Udemy for WordPress.