The flop, opened up
Setup (pin)
Hold (pin)
Window width
Clock → Q
Press Fire clock to capture D.
Setup and hold are measured at the pins, but they come from a latch hidden inside the cell. Add clock buffers inside the cell and watch setup turn negative.
Watch the lesson on YouTubeSetup time in a flop: where does it come from?▶ Watch on YouTube
Need a certificate?STA Basic and Advanced: Zero to HeroThe games and labs stay free. For a certificate of completion, Q&A with Vikas and lifetime access, take the full course on Udemy.Take the course on Udemy ↗
The master latch needs data steady 30 ps before its own clock edge and 10 ps after. That 40 ps aperture never changes.
Pin setup = 30 + D path − clock path. Pin hold = 10 − D path + clock path. Delay the internal clock and the whole window slides later.
When the clock path is longer than the D path, data may arrive after the clock pin edge. Library .lib tables really do contain negative setup or hold values.
Hold grows by exactly what setup loses, and clock → Q gets slower. Setup + hold can never drop below zero.