A peer code review of RTL, testbench and test cases is a structured read of the code by colleagues, checked against the specification and the verification plan, before the code is relied on for sign-off. It finds bugs that simulation has not yet exercised, enforces coding guidelines and spreads knowledge across the team. On its own it cannot prove 100% verification closure, but it covers the gaps that simulation, coverage and formal tools leave, and it is one of the cheapest ways to stop the same mistake from appearing twice.
The topic of "peer code review" is a widely discussed topic in the context of design verification. I remember the times very early in my career when my code was reviewed. There were lots of positives, occasionally with some negatives, which I have improved over time. What is it that people look for in a code review, and what is the value add? Is it the easiest and most powerful way of hunting down issues and avoiding their repetition by educating people, a method too often neglected in favour of complex tools and methodologies which are never idiot-proof?
Key takeaways
- Reviews work partly because they are expected: authors check their own code harder when they know peers will read it.
- A review needs specific targets. Coding guidelines are the easy target; spec compliance, reset and clocking, corner cases and testbench checking are the valuable ones.
- Review RTL, testbench and test cases together with the spec and the verification plan, not in isolation.
- Self review comes first and catches the cheap issues, so the peer review time goes on design intent.
- Let lint, CDC and formal tools handle what they do well, so people spend review time on what tools cannot judge.
- Record review items in the verification plan so the review counts towards closure, rather than being a meeting with no trace.
Why peer code reviews work
I still remember the comments from my first code reviewer, who said: "Peer code reviews are like speed bumps on the highway where the ultimate goal is not to impose a fine but for the prevention of speeding violations in general". Translating this to the way we code is the ultimate benefit for the whole team.
The significant gain is that the person whose code is being reviewed puts in that extra effort to check the missed signals in the sensitivity list and add default states in FSMs when they know their code is going to be put under the spotlight in front of their peers. Many potential bugs get fixed even before the code gets to the review committee. Furthermore, this is the right forum to ensure that people are following the coding guidelines that should be in place. Not only does the code owner get feedback, the peers in the room generally apply the same lessons to their own code, resulting in an overall improvement and value add.
The cost: time
All said well, the main problem is always time: code reviews consume significant resources and valuable productive time. Even so, in any organisation peer code reviews have to be part of the methodology, be it design or verification. The way to keep the cost down is to make each review short, targeted and prepared, rather than to skip it.
| Practice | Why it saves time |
|---|---|
| Run lint, CDC and synthesis checks before the review | Nobody spends meeting time on issues a tool reports in seconds |
| Review a few hundred lines per session, not a whole block | Attention drops in long sessions and later findings get shallower |
| Send the code, spec section and checklist a day ahead | Reviewers arrive with findings, and the meeting resolves them |
| Review changes (diffs) for later rounds | Repeat reviews focus on what moved, not on code already accepted |
| Keep a short findings log with owner and status | Items get closed and the same issue is not argued twice |
Self code review is probably more important
Self code review is probably more important than the peer review itself. A good self review uses the same checklist the peers will use, runs the lint and CDC tools clean (or with each waiver explained), and walks through the code against the spec one feature at a time. The author knows the intent better than anyone, and fixing the obvious items alone means the peer review can concentrate on the hard questions: is this what the spec meant, and would the testbench notice if it were wrong?
Set specific targets for every review
A problem with any code review is the lack of specific targets and the right audience. As said above, in a peer code review people learn from each other; however, it is generally not 100% clear what specific targets are to be achieved. Coding guidelines are the easy ones among the possible targets, but they should not be the only targets. The lists below are a starting point; each team should tune them to its own bug history.
RTL review checklist
- Spec compliance: every requirement in the spec section maps to code, and nothing in the code is unexplained by the spec.
- Reset: every state element that needs a reset has one, with the right polarity and synchronous or asynchronous style as per the guidelines.
- FSMs: default and illegal states handled, no unreachable states, outputs defined in every state.
- Combinational logic: complete sensitivity lists (or
always @*/always_comb), no inferred latches, every branch assigns every output. - Clocking and CDC: every crossing uses an approved synchroniser or FIFO, no logic on clock paths without review, gated clocks use the library clock-gating cell.
- Widths and arithmetic: no silent truncation, signed and unsigned use is deliberate, overflow behaviour is defined.
- Corner cases: back-to-back requests, full and empty conditions, counters at their limits, simultaneous events.
- Synthesis and timing: no long combinational chains that will clearly fail timing, no simulation-only constructs in synthesisable code.
Testbench review checklist
- Checking: every output that matters is checked by a scoreboard, reference model or assertion. A testbench that drives stimulus but checks nothing passes every test.
- Independence: the reference model is written from the spec, not copied from the RTL, so the same misunderstanding does not appear in both.
- Error reporting: a failure stops or flags the test clearly; errors are counted and the final pass or fail is printed from the count.
- Coverage model: functional coverage points and crosses match the features and corner cases in the verification plan.
- Stimulus: constraints allow the legal corner cases and do not over-constrain the interesting ones away.
- Timeouts and end of test: tests cannot hang silently and do not end before outstanding transactions complete.
Test case review checklist
- Each test traces to one or more items in the verification plan.
- Directed tests cover the cases random stimulus is unlikely to reach, such as error injection or rare mode changes.
- Seeds and configuration are recorded so a failure can be reproduced.
- Expected results are stated, so a test is not passing simply because nothing was compared.
Reviews belong in the verification plan
Based on my experience, code reviews ideally should come with spec and verification plan reviews. The reviewed spec should be complete and clear enough to define how to assure its correct implementation. The code review plan should be a part of the verification plan, so that it is part of the integrated solution to assure the implementation's correctness.
Theoretically, the verification plan should include a complete set of conceptual properties to verify. This set should be complete enough to 100% assure the implementation's correctness. Some of the properties should be proven in code review and the rest should be proven with other methods. As an industry, we do not know how to create a theoretically complete spec, and we do not know how to create a theoretically complete verification plan. However, we should at least start taking some steps in the right direction.
Which method closes which property
A practical way to take those steps is to assign each verification plan item an owner method. The table below is an illustrative split; real projects will differ.
| Property type | Best closed by | Example |
|---|---|---|
| Structural rules | Lint and CDC tools | No latches, all crossings synchronised |
| Control logic invariants | Formal property checking | FIFO never overflows; one-hot state stays one-hot |
| Data path and protocol behaviour | Constrained-random simulation with coverage | Every packet length and type delivered correctly |
| Spec intent and things tools cannot see | Code review | Priority order matches the spec; a mode bit means what the architect meant |
| Testbench quality | Code review plus mutation or fault insertion | An injected RTL bug is caught by the checkers |
When a review item is closed, record it against the plan item, just as a covered coverage point or a proven property is recorded. That is how a review contributes to the closure claim instead of sitting outside it.
Common mistakes
- Reviewing RTL without the spec open, which reduces the review to style comments.
- Reviewing only the RTL and never the testbench, so weak checkers go unnoticed until silicon.
- Letting the review become a debate on style that the coding guideline should already settle.
- Inviting too many people, or only people who do not know the interface being reviewed.
- Treating review findings as personal criticism; the speed bump exists to prevent the violation, not to punish it.
- Closing the meeting without an owner and date for each finding.
FAQ
Can a code review replace coverage closure?
No. A review is a sample read by people; coverage measures what simulation actually exercised. They complement each other: the review checks that the coverage model asks the right questions, and coverage shows whether the tests answered them.
Who should attend an RTL review?
The author, at least one designer who knows the neighbouring blocks, the verification engineer for the block, and ideally the architect or spec owner for the part of the spec being reviewed. A small group of three to five people is usually enough.
Should the testbench be reviewed by designers?
Yes, at least in part. A designer reading the checkers will often spot a behaviour the verification engineer interpreted differently from the RTL, and that disagreement is exactly the kind of bug a review should surface.
When in the project should reviews happen?
Early enough that findings are cheap to fix: once the code compiles and passes basic tests, and again after major changes. A review held only at the end becomes a box-ticking exercise.

Replica Louis Vuitton Handbags
ReplyDeleteReplica Louis Vuitton Fall Winter 2010
Replica Louis Vuitton Prefall 2010
Replica Louis Vuitton Sping Summer 2010
Replica Louis Vuitton 2009 Collection
Replica Louis Vuitton Antheia
Replica Louis Vuitton Monogram Canvas
Replica Louis Vuitton Monogram Macassar Canvas
Replica Louis Vuitton Monogram Denim
Replica Gucci Handbags
Replica Chanel Handbags
Replica Hermes Handbags
Replica Alexander Wang Handbags
Replica Balenciaga Handbags
Replica Bottega Veneta Handbags
Replica Burberry Handbags
Replica Louis Vuitton Monogram Vernis
Replica Louis Vuitton Monogram Mini Lin
Replica Louis Vuitton Monogram Multicolore
Replica Louis Vuitton Monogram Idylle
Replica Louis Vuitton Cosmic Blossom
Replica Louis Vuitton Damier Ebene Canvas
Replica Louis Vuitton Damier Azur Canvas
Replica Louis Vuitton Damier Graphite Canvas
Replica Louis Vuitton Damier Geant Canvas