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

The QoR loop — write → lint → sim → synthesize → rewrite

Quality of Results (QoR) is not a one-shot gate — it is a loop. You write RTL, run checks, read reports, fix issues, and repeat until the block meets the team's bar for function, timing, area, CDC, and power. This lesson ties Module 9 together and points to Module 10 verification.

QoR loop

The iterative workflow every RTL engineer runs: implement → lint → simulate → synthesize → analyze reports → rewrite RTL → repeat until "done enough" for the milestone.

1

The loop — your daily rhythm

QoR loop flowchart

Early loops are fast (lint/sim). Later loops add synthesis. Don't skip straight to PNR — fix RTL issues cheaply first.

StageWhat you learnTypical failure → fix
LintCoding violations, latch inference, CDC structComplete case; fix async reset; add synchronizer
SimFunctional correctnessFSM bug, off-by-one, handshake stall
SynthesisTiming slack, area, inferred memoriesPipeline combo; ROM vs case; register enable
CDC/RDCCross-domain protocolGray ptr; FIFO; remove bus sync
PowerClock gating coverageAdd CE; operand isolation
2

Each step — minimum viable actions

qor_loop.sh — conceptual script
#!/bin/bash
# Minimal QoR loop for a block — adapt to your flow

BLOCK=uart_tx
RTL=rtl/${BLOCK}.v
TB=tb/${BLOCK}_tb.v

echo "=== 1. Lint ==="
verilator --lint-only -Wall $RTL 2>&1 | tee reports/lint.log
grep -i error reports/lint.log && exit 1

echo "=== 2. Simulate ==="
iverilog -g2012 -o sim.vvp $RTL $TB && vvp sim.vvp | tee reports/sim.log
grep -i fail reports/sim.log && exit 1

echo "=== 3. Synthesize (example) ==="
# yosys / dc / genus — read timing + area reports
# grep "slack" reports/timing.rpt

echo "=== 4. Review & rewrite ==="
# Map worst path → RTL line → pipeline or restructure
# Re-run loop
lint_waiver_template.txt
// Lint waiver — must include justification (not "ignore")
// Rule: CDC_MULTI_BIT
// Signal: status_bus_cross
// Owner: jsmith
// Reason: Replaced with toggle handshake in rev 2.1 — waiver obsolete, remove.
// Expiry: 2026-Q3
Trap

Chasing timing in place-and-route when the RTL has a 3-level priority mux in one cycle — you will iterate for weeks. Read the synthesis critical path first; fix RTL structure, then re-synthesize.

qor_iteration_log.md
# QoR iteration log — template per block milestone
| Iter | Lint ERR | Sim    | WNS (ns) | Area (kGE) | CDC open | Action taken        |
|------|----------|--------|----------|------------|----------|---------------------|
| 1    | 12       | fail   | —        | —          | 3        | fix latch, add sync |
| 2    | 0        | pass   | -0.45    | 42.1       | 0        | pipeline arbiter    |
| 3    | 0        | pass   | +0.08    | 43.0       | 0        | ACCEPT — RTL freeze |
3

"Done enough" — milestone checklist

Perfection is not the bar at every checkpoint. Know what "done" means for each milestone:

MilestoneDone enough means
First RTL dropLint-clean (or waivers filed); sim passes directed tests; CDC protocol named per crossing
Feature completeSelf-checking TB; coverage on main modes; synthesis runs without error
RTL freeze candidateTiming met or known exceptions with fix plan; area within budget; CDC signoff started
RTL freezeAll waivers approved; no open functional bugs; timing/area signed by owner
  • Lint: zero ERROR severity (warnings reviewed or waived)
  • CDC: every crossing has Gray/FIFO/handshake — no raw buses
  • Sim: self-checking TB passes; key corner cases exercised
  • Timing: worst slack ≥ 0 at target frequency (or documented exception)
  • Area: within block budget or escalation filed
  • Power: clock enables on idle datapath; no combo clock gates
  • Documentation: interface spec updated for added pipeline latency
4

Module 9 checkpoint

You have covered the full quality stack an RTL author owns before handoff to backend and verification teams:

🔍

Lint & style

Catch latches, incomplete case, and coding violations before sim waste.

🌉

CDC

Gray pointers, FIFOs, handshakes — never tear a bus.

⏱️

Timing

Critical path intuition; pipeline deep combo; read slack reports.

📐

Area & power

Mux cost, resource sharing, clock enable — not combo gating.

Lint→CDC→Timing→Area→QoR loop
module9_review_questions.md
# Module 9 self-check — answer before Module 10
1. Name three lint rule families and one example violation each.
2. Why is 2-FF sync insufficient for a 32-bit binary counter?
3. What RTL structure kills timing? Name two fixes.
4. When does resource sharing save area? When does it fail?
5. Write clock-enable RTL — never combo-gate clk. Why?
6. What does negative setup slack mean? What do you do first?
5

Preview — Module 10: Verification

Module 9 made your RTL worthy of silicon. Module 10 makes you prove it:

  • 10.1 Self-checking testbenches — automated pass/fail without waveform babysitting
  • 10.2 Coverage — did you exercise every FSM state and corner case?
  • 10.3 Assertions — SVA properties that catch bugs closer to the source
  • 10.4 Regression — the QoR loop adds "run full regression" before every milestone

The full professional loop: Write RTL (Modules 1–7) → Pipeline for performance (Module 8) → Close QoR (Module 9) → Verify exhaustively (Module 10) → Integrate and tape out. You are now equipped for the verification half.

self_checking_stub.v — Module 10.1 preview
// QoR loop step 3 evolves into Module 10 rigor
integer errors;
initial errors = 0;

task check_eq(input [31:0] got, expected, input string msg);
  if (got !== expected) begin
    $display("FAIL %s: got %0d exp %0d", msg, got, expected);
    errors++;
  end
endtask

// At end of sim:
initial begin
  // ... run tests ...
  if (errors == 0) $display("=== QoR SIM PASS ===");
  else $display("=== %0d FAILURES — fix RTL, re-loop ===", errors);
end

🎯 What to remember

  • QoR is a loop — write, lint, sim, synthesize, rewrite until milestone bar met.
  • Fix cheap issues early (lint, CDC structure) before expensive PNR iterations.
  • "Done enough" depends on milestone — know the checklist for each gate.
  • Module 9 complete — Module 10 adds verification depth to the same loop.
  • Track QoR metrics per iteration — don't merge on gut feel

Regression in the loop: After RTL freeze candidate, every QoR iteration runs the full regression suite — not just the one test you fixed. A timing fix that breaks a corner-case test is not progress.

Advertisement