Drawing turns a verbal question into something you can compute on. A good sketch has five elements and takes thirty seconds. Interviewers watch whether you draw the clock edges, because that is where most mistakes originate.
Element | What to write |
|---|---|
Launch flop | Clock arrival (latency), clock-to-Q |
Logic | Cell and net delays, summed |
Capture flop | Clock arrival, setup time (and hold time) |
Clock edges | Launch edge and capture edge times, so the period or fraction of it is explicit |
Times | Arrival time at the capture D pin; required time; slack |
# Period 1.25 ns. Launch latency 0.30, clk-to-Q 0.40, logic 0.55; capture latency 0.35, setup 0.06, hold 0.05.
T = 1.25
launch_lat, cq, logic = 0.30, 0.40, 0.55
cap_lat, setup, hold = 0.35, 0.06, 0.05
arrival = launch_lat + cq + logic # 1.25
required = T + cap_lat - setup # 1.54
setup_slack = required - arrival
min_arrival = launch_lat + 0.30 + 0.20 # shortest path: clk-to-Q 0.30, logic 0.20
hold_slack = min_arrival - (cap_lat + hold)
assert round(arrival, 3) == 1.25 and round(required, 3) == 1.54
assert round(setup_slack, 3) == 0.29 and round(hold_slack, 3) == 0.40
print("PASS: setup slack", round(setup_slack, 3), "hold slack", round(hold_slack, 3))From the sketch: arrival 1.25 ns (0.30 + 0.40 + 0.55), required 1.54 ns (1.25 + 0.35 - 0.06), setup slack +0.29 ns. For hold, the shortest path arrives at 0.80 ns against 0.40 ns of capture latency plus hold time, giving +0.40 ns. Drawing the capture latency separately is what makes the skew visible: it helped setup by 0.05 ns here and cost hold by the same amount.
Whether you separate data path from clock paths and include both latencies.
Whether you know the capture edge: one period after launch for a same-edge pair, half for opposite edges.
Whether you can compute slack from your own sketch without prompting.
The capture edge is half a period after launch, so required time is T/2 + cap latency - setup = 0.625 + 0.35 - 0.06 = 0.915 ns, and setup slack becomes -0.335 ns.