What is search-and-repair in detail routing?
From PDVerse PnR Interview Handbook · pdVerse Mentor Guide
Short Answer
Search-and-repair is the part of detail routing that clears design rule violations. The router first connects every net, even if that leaves shorts and spacing errors. It then runs repeated iterations that search for violations, rip up the wires involved in a small area, and reroute them until the violations are gone or stop improving.
Technical Explanation
- Detail routing routes the block in small areas called switchboxes. The first goal is completeness: no open connections, even if some connections break design rules. The underlying search is a maze route, a breadth-first expansion across the track grid that is guaranteed to find the shortest legal path for one connection if one exists.
- Search-and-repair then loops. Each iteration finds violations such as metal spacing, notches and shorts, rips up the nets causing them in a local window, and reroutes them with the violation marked as expensive.
- The DRC count should fall quickly in early iterations and then flatten. Zroute prints a DRC summary at the end of each iteration, which is the best signal for whether routing is converging.
- Antenna fixing happens inside these iterations too. By default it starts in the second iteration, once initial routing and basic DRC fixing are done.
- If the count stops falling, more iterations rarely help. The remaining violations usually come from something the router cannot solve locally: too much demand in the area, a blocked pin, or a bad rule setting.
route_detail -incremental true -initial_drc_from_input trueresumes search-and-repair from the DRC data stored in the block, so runcheck_routesfirst if anything changed.- Search-and-repair does not connect open nets. If
check_routesreports opens, those need ECO routing. - Each rip-up has a cost. Nets moved to clear one violation can create new ones nearby, which is why the count sometimes rises for an iteration before falling again. A single bump is normal; a count that keeps bouncing means the area has no legal solution at its current density.
Common Mistake
The Trap: Raising the iteration limit when DRCs plateau. An engineer sees 400 DRCs after 40 iterations and reruns with a much higher limit. Runtime doubles and the count drops to 380. The 400 were all in one channel with 120% demand; the fix was reducing local cell density, not more search.
Follow-up Question & Model Response
"How do you tell the difference between DRCs that need more iterations and DRCs that never will converge?"
Candidate Model Response: Watch the per-iteration count. If it is still falling steadily, more iterations or an incremental pass will help. If it is flat for several iterations, look at where the DRCs are. Scattered single violations of different types usually clean up with an incremental run. A tight cluster, a single violation type repeating at pins of the same cell, or violations on NDR nets point at a cause outside the router: congestion, pin access or rules. Those need a design change.
Practical Example
Tapeout Scenario: Detail routing on a block starts with 21,000 violations after the first pass (illustrative). The per-iteration log shows 21,000, 6,200, 1,900, 620, 240, 110, 96, 94, 94. The first six iterations are real search-and-repair progress. The last three are flat, and the remaining 94 all sit on the corners of two SRAM macros. The engineer stops iterating and fixes pin access with routing guides; the next run ends at 3. A tight cluster like this almost always has one cause, here pin access at the macro corners. A flat tail after a steep drop means the router has done everything it can locally. The same 94 DRCs spread evenly over the block with a curve still falling would have justified an incremental detail routing pass instead.
PnR Flow Mentor Guide
Master the Physical Design Implementation Flow
Read the complete 8-chapter PnR Flow Mentor Guide free on the web — library setup through placement, clock tree synthesis, routing, chip finishing, hierarchical implementation, and ECO, all the way to stream-out.

Continue practising