TL;DR: Few things terrify an ASIC designer more than a post-layout functional bug found right before mask generation. Resynthesizing from RTL threatens timing closure and tape-out schedules, leaving you with one agonizing option: an Engineering Change Order (ECO) directly on the gate-level netlist. In a recent tape-out cycle, I faced an ECO requiring 120 discrete netlist edits across eight instances, repeated across four different physical design netlist baselines—normally a solid week of high-stress text surgery. By building a disciplined, staged execution flow with Claude Code, I completed the entire task in three hours with comprehensive documentation. Here is the engineering workflow.
If you are a chip designer, few milestones feel as sweet as your “final” RTL drop. The functional verification suite has passed, the design has completed synthesis, floorplanning, placement, and routing, and the team is preparing the tape-out database for mask generation.
And then the verification team flags an issue.
An edge-case bug made it through the cracks, and the chip will not function correctly without a logic modification.
At this stage, you cannot simply fix your clean SystemVerilog or VHDL, run make clean, and rerun the physical implementation flow. Complete re-synthesis and re-routing will invalidate weeks of timing closure, introduce unpredictable placement churn, and blow through your tape-out tape deadline.
Your only viable path forward is an ECO (Engineering Change Order) directly on the physical netlist.
Why Gate-Level Netlist Surgery is Brutal
In clean RTL, your design is modular, hierarchical, and readable. In a gate-level netlist, that clean code is flattened into a massive, multi-million-line text file of raw standard cells, primitive gates, and synthetic wire names.
Performing netlist surgery by hand introduces multiple engineering headaches:
- Loss of Intuition: Readable state machines and clean conditionals become sprawling webs of
U10492AND gates, inverters, and cryptic nets. - Synthesis Optimization Divergence: If a module is instantiated eight or sixteen times, physical synthesis tools often optimize each instance differently based on local routing congestion and timing pressure. An ECO that looks identical in RTL must be mapped to distinct gate topologies for every single physical instance.
- Physical Constraints and Spare Gates: You cannot freely drop new standard cells onto a routed die. You must locate pre-placed “spare gates” within immediate physical proximity to avoid catastrophic setup/hold timing violations. If a local multiplexer isn’t available, you may have to synthesize one out of spare AND, OR, and NOT gates.
- Testability Structures: Edits must not disrupt existing scan chains or DFT (Design for Test) logic. A misplaced wire can easily break fault coverage or corrupt scan chain integrity.
In my recent scenario, the logical fix was relatively straightforward: two targeted logic changes inside a module that was instantiated eight times. One change required inserting a 2-input multiplexer at a specific flip-flop D-pin; the second required qualifying an existing signal with a 2-input AND gate.
The arithmetic, however, made it daunting:
- Each instance required ~15 discrete netlist edits (3 new gate instantiations, 5 internal wire declarations, port re-mappings, and strict hierarchical naming convention compliance).
- That totaled 120 edits per netlist.
- To support ongoing physical design and timing closure checks, this fix had to be retrofitted across 4 distinct netlist snapshots from different stages of the physical implementation pipeline.
That is roughly 480 manual netlist edits. In a traditional flow, this represents at least a week of grueling manual work: writing scripts or hand-editing lines, hunting syntax typos, resolving pin mismatches, verifying formal equivalence, and coordinating handoffs.
The Agentic Playbook with Claude Code
Rather than treating AI as a magic black box to write Verilog from scratch, I used Claude Code as an interactive, highly auditable execution assistant.
The key to preventing AI hallucinations on a large codebase is strict staging: separate the discovery and planning phase from the execution phase.
Here is the exact framework I used to guide the agent:
Plaintext
1. Context:
- Perform an ECO on the gate-level netlist `dma_top.v`.
- Edits target 8 specific instances of module `XYZ` (XYZ_0 through XYZ_7).
2. Logic Requirements per Instance:
- Fix 1: Add a 2-input mux at the D-input of flop [instance_name]/reg_q and hook up the specified control/data signals.
- Fix 2: Qualify the signal [net_name] with an AND gate using the specified qualifier.
- Interface: Add a new input port "sel" to module XYZ to drive the fix multiplexers.
3. Discovery & Staging:
- Find all 8 instances of XYZ in `dma_top.v`.
- Trace the local net names for each instance.
- Formulate discrete instruction sets: ECO_XYZ_0, ECO_XYZ_1, ... ECO_XYZ_7.
- Output these instructions into `eco_description.txt` for human review prior to touching the code.
4. Execution:
- Apply the validated instruction sets across all 8 instances.
- Connect the newly added "sel" port on each instance to the top-level net `data_sel_q`.
5. Extraction & Verification Artifacts:
- Extract the modified module-level netlists into individual files (`XYZ_0.v` through `XYZ_7.v`) for isolated review.
- Write the finalized full design to `dma_top_eco.v`.
- Generate an ECO summary document detailing every cell added, pin hooked, and net modified.
The Payoff: One Week Compressed to Three Hours
The initial setup and prompt tuning took about one hour on the first netlist baseline.
Once the agent established the correct pattern matching and output structure, the workflow ran like clockwork. Applying the staged changes across the remaining three netlist snapshots, verifying module integrity, and generating the documentation took another two hours.
A task that traditionally consumed a full week of high-stress manual editing was completely resolved in three hours.
Crucially, because the agent generated isolated module extractions (XYZ_0.v through XYZ_7.v), diffing each instance before running formal verification was fast and straightforward. Running our Logical Equivalence Checking (LEC) tools confirmed zero functional regressions outside the targeted logic cone.
Preserving Human Judgment in Automated Workflows
In earlier posts, I’ve discussed the risk of cognitive offloading—becoming so reliant on smart tools that our underlying technical skills atrophy.
This post-layout ECO flow demonstrates the exact opposite: virtuous automation.
Hunting through 100,000 lines of flat gate-level netlist text to verify that pin names match a naming standard is not high-value architectural reasoning. It is mechanical toil with an immense human error rate.
The human engineer defines the logic fix, audits the timing constraints, verifies the scan implications, and inspects the staged plan. The agent handles the tedious parsing, renaming, and file surgery. By offloading the mechanical friction without surrendering the architectural oversight, you get the best of both worlds: error-free netlist edits and a preserved tape-out schedule.


