RTL Design / Module 9: Lint · CDC · Timing · Area · QoR
Lesson 9.8

Critical path intuition for RTL authors

Synthesis maps your RTL to gates and wires. Between each pair of flops, signals propagate through combinational logic. The critical path is the slowest route — it sets your maximum clock frequency. You do not need to master STA tools to write timing-aware RTL.

Critical path

The longest delay path from one register's clock edge to the next register's setup window in the same clock domain. If this path exceeds the clock period minus setup time, the chip fails timing.

1

Setup, period, and slack — the mental model

Critical path from flop to flop

STA tools enumerate thousands of paths; the worst one is critical. Your RTL choices grow or shrink that cloud.

TermPlain EnglishRTL author action
Clock periodTime budget per cycle (e.g. 1 ns @ 1 GHz)Know target frequency early; design to it
Setup slackHow much time left before capture flop needs dataNegative slack → shorten combo path or pipeline
Hold slackData must stay stable briefly after clock edgeUsually fixed by PNR; avoid combo loops on same edge
Critical pathWorst setup path in the blockFind it in reports; that's your rewrite target

At 1 GHz the clock period is 1 ns. Setup might consume 50–100 ps, clock skew another 50–100 ps, leaving roughly 800 ps for combo logic on the critical path. That budget shrinks fast with wide arithmetic.

2

Hold time — the other slack

Setup violations mean you're too slow. Hold violations mean data changes too fast after the clock edge — the capture flop sees a new value before it should. RTL authors rarely fix hold directly (PNR inserts delay buffers), but you can cause hold pain with:

  • Combo logic between closely placed flops on the same edge
  • Gated clocks with uneven tree delay
  • Short paths through a bypass mux right next to the source flop
Setup (too slow): data arrives AFTER capture window closes → VIOLATED setup Hold (too fast): data changes BEFORE hold time satisfied → VIOLATED hold RTL fix for setup: pipeline, simplify combo RTL fix for hold: usually none — PD adds buffer; avoid odd clock hacks
3

How RTL authors spot slow paths without STA mastery

You do not need to run PrimeTime on day one. Ask these questions while writing or reviewing RTL:

🔗

How deep is the combo?

Each arithmetic op, compare, or mux level adds delay. A 32-bit add + 32-bit compare + 8:1 mux in one cycle is suspect at high Fmax.

📏

How wide?

Wide operands mean physically long carry chains. A 64-bit add is slower than 16-bit; two 16-bit adds in series may be faster overall if pipelined.

🌳

Priority depth?

Nested if/else and priority encoders serialize mux levels. A 16-entry priority arbiter in one cycle is a timing magnet.

🔄

Feedback in one cycle?

Result computed from register, written same cycle — combo loop through the reg. Classic FSM next-state in one always block: watch path length.

slow_path_example.v
// Likely critical path: compare + subtract + mux in one cycle
always @(*) begin
  if (a > b && a > c && a > d)      // 3 comparators (tree)
    result = a - offset;               // subtractor
  else if (b > c && b > d)
    result = b - offset;
  else
    result = (c > d) ? c - offset : d - offset;
end
// At 500 MHz this screams — pipeline or simplify priority
pipelined_fix.v
// Stage 1: find max index (registered)
always @(posedge clk) max_idx <= argmax4(a, b, c, d);

// Stage 2: subtract only selected operand — shorter combo per stage
always @(posedge clk) begin
  case (max_idx)
    2'd0: result <= a - offset;
    2'd1: result <= b - offset;
    2'd2: result <= c - offset;
    2'd3: result <= d - offset;
  endcase
end
Trap

Assuming "it simulates fine" means timing is closed. Simulation is cycle-accurate at your timescale; silicon cares about picoseconds inside the cycle.

path_budget_table.md
# Rough combo delay budget @ 28nm (order of magnitude)
Operation          Typical delay   Notes
2:1 mux 32-bit     50–80 ps        per level
32-bit adder       150–250 ps      carry chain length
32-bit comparator  100–180 ps      tree of 2:1 compares
32×32 multiply     800–1200 ps     almost always pipe

Target Fmax 1 GHz → 1000 ps period − ~150 ps overhead ≈ 850 ps combo budget
One add + one compare + one mux ≈ 400 ps — OK
Add + mul + compare same cycle     ≈ 1200+ ps — FAIL
4

Reading a timing report — enough to be dangerous

After synthesis, you get a report listing paths sorted by slack. You need three fields:

Report fieldWhat it tells you
StartpointLaunch flop and pin (e.g. state_reg[2]/CK)
EndpointCapture flop and pin (e.g. next_state[2]/D)
Slack (MET/VIOLATED)Positive = margin; negative = must fix
Logic levelsCount of gates on path — high count = deep combo

RTL author's loop: Read worst path → map start/end to your module signals → identify the combo block between them → pipeline, retime, or simplify. You do not need to understand every derate and OCV term on day one.

timing_report_snippet.txt
Path 1: VIOLATED Setup
  Startpoint: pipe_stage1/result_reg[15] (rising edge-triggered flip-flop)
  Endpoint:   pipe_stage2/sum_reg[31]    (rising edge-triggered flip-flop)
  Path Group: clk
  Path Type:  max

  Delay      Incr      Path
  ---------------------------------------------------------
  clock clk (rise edge)               0.00    0.00
  clock network delay (ideal)         0.10    0.10
  pipe_stage1/result_reg[15]/CK (DFF) 0.00    0.10 r
  U1234 (MUX2)                        0.18    0.28 f
  U5678 (ADD32)                       0.42    0.70 r   <-- bottleneck
  pipe_stage2/sum_reg[31]/D (DFF)     0.00    0.70 r
  clock clk (rise edge)               1.00    1.00
  clock network delay (ideal)         0.08    1.08
  library setup time                  -0.05   1.03
  ---------------------------------------------------------
  data required time                            1.03
  data arrival time                             0.70
  ---------------------------------------------------------
  slack (VIOLATED)                             -0.33

Map U5678 (ADD32) back to your Verilog: search for the adder between pipe_stage1/result_reg and pipe_stage2/sum_reg. The fix is either register the adder input or split into two pipeline stages (Lesson 9.9).

5

Frequency planning — pick Fmax before you code

Block typeTypical targetRTL implication
CPU execution1–3 GHzHeavy pipelining; shallow combo per stage
Control / FSM200–500 MHzMoore outputs; registered next-state
Peripheral (UART, SPI)50–200 MHzSimple paths; often over-clocked for margin
Always-on / RTCkHzTiming easy; CDC to fast domain is the hard part

Ask your lead for the target frequency and corner (slow-slow hot? fast-fast cold?) before writing datapath RTL. A block coded for 200 MHz needs different structure than one targeting 1.2 GHz.

6

Practical checklist

  • Know target clock frequency before writing datapath RTL
  • Flag any single-cycle path with add + compare + wide mux
  • Pipeline long arithmetic; register FSM next-state logic if deep
  • After synthesis, read top-5 negative slack paths and map to RTL
  • Discuss critical path with reviewer — "where is the slow path?" is a fair question
  • Do not over-pipeline: extra flops cost area and latency (Lesson 9.9)
  • When pipelining, update valid/ready or fixed-latency spec for downstream blocks
🔴

Red flag paths

Add + compare + mux in one always @(*) — almost always needs a register.

🟡

Yellow flag paths

16-entry priority if-chain — may pass at 200 MHz, fail at 500 MHz.

🟢

Green paths

Single mux or single add between flops — usually fine until very high Fmax.

review_timing_questions.md
# Questions to ask in every RTL review (timing)
- What is the target Fmax and process corner?
- Where is the deepest combo block? How many ops?
- Is there add + compare + mux in one cycle anywhere?
- If we pipeline, who absorbs the extra latency?
- Has synthesis been run, or is this pre-STA intuition only?

Bring these questions to code review even before the first synthesis run — catching a 3-level priority cloud in review is cheaper than reading a -0.4 ns slack report at 2 AM.

Trap

Chasing hold violations in RTL when the path is a short bypass mux next to the launch flop — hold is usually a PD buffer fix. Don't pipeline randomly; understand whether the violation is setup or hold first.

🎯 What to remember

  • Critical path = slowest flop-to-flop route; it caps Fmax.
  • Slack = timing margin; negative means rewrite or pipeline.
  • Count combo depth, width, and priority — your pre-STA intuition.
  • Read worst-path reports to connect gates back to your Verilog.
Advertisement