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.
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.
STA tools enumerate thousands of paths; the worst one is critical. Your RTL choices grow or shrink that cloud.
| Term | Plain English | RTL author action |
|---|---|---|
| Clock period | Time budget per cycle (e.g. 1 ns @ 1 GHz) | Know target frequency early; design to it |
| Setup slack | How much time left before capture flop needs data | Negative slack → shorten combo path or pipeline |
| Hold slack | Data must stay stable briefly after clock edge | Usually fixed by PNR; avoid combo loops on same edge |
| Critical path | Worst setup path in the block | Find 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.
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:
You do not need to run PrimeTime on day one. Ask these questions while writing or reviewing RTL:
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.
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.
Nested if/else and priority encoders serialize mux levels. A 16-entry priority arbiter in one cycle is a timing magnet.
Result computed from register, written same cycle — combo loop through the reg. Classic FSM next-state in one always block: watch path length.
// 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
// 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
Assuming "it simulates fine" means timing is closed. Simulation is cycle-accurate at your timescale; silicon cares about picoseconds inside the cycle.
# 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
After synthesis, you get a report listing paths sorted by slack. You need three fields:
| Report field | What it tells you |
|---|---|
Startpoint | Launch flop and pin (e.g. state_reg[2]/CK) |
Endpoint | Capture flop and pin (e.g. next_state[2]/D) |
Slack (MET/VIOLATED) | Positive = margin; negative = must fix |
| Logic levels | Count 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.
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).
| Block type | Typical target | RTL implication |
|---|---|---|
| CPU execution | 1–3 GHz | Heavy pipelining; shallow combo per stage |
| Control / FSM | 200–500 MHz | Moore outputs; registered next-state |
| Peripheral (UART, SPI) | 50–200 MHz | Simple paths; often over-clocked for margin |
| Always-on / RTC | kHz | Timing 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.
Add + compare + mux in one always @(*) — almost always needs a register.
16-entry priority if-chain — may pass at 200 MHz, fail at 500 MHz.
Single mux or single add between flops — usually fine until very high Fmax.
# 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.
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.