Simulation-Aware In-Context Policy Improvement for LLM-Aided Analog Layout Refinement
Bingyang Liu, Ziming Wei, Xiaohan Gao, David Z. Pan
cs.AI, cs.RO
2026-08-14
A GPT-5 multi-agent ICPI loop on MAGICAL beats heuristics and Bayesian layout tuning with 11 post-layout simulations on two OTAs.
Analog layout is still a generate, extract, simulate, and retune loop run by experts. End-to-end generators such as ALIGN and MAGICAL can emit a first DRC-clean layout, but gain, bandwidth, and CMRR are decided by net weights, placement bias, symmetry, routing priority, and wire width. Those knobs are usually frozen into one heuristic set that does not track a new spec.
Bayesian optimization is standard for device sizing. At layout it wants hundreds to thousands of evaluations, each a parasitic extraction plus a post-layout sim, while a real budget is often tens of runs. Earlier LLM layout assistants describe geometry in prose, so the state is fuzzy and experience does not accumulate on one circuit. This UT Austin paper narrows the job: wrap a MAGICAL-derived generator with frozen-weight in-context policy improvement (ICPI) and retune those knobs inside about ten post-layout simulations.
The action space is not polygons. It is five families the generator already exposes: net weights, placement bias, symmetry constraints, routing priority, and wire widths. The space is still combinatorial, so a one-shot Analyzer reads the netlist, splits functional blocks, and marks mismatch- and parasitic-sensitive devices and nets. That prior is computed once.
A three-agent act-observe-reflect loop does the search. The Supervisor sees the current layout state, the Analyzer hints, and a design journal, then picks exactly one parameter family and a high-level goal, such as tighter matching on a pair or higher routing priority on critical nets. The Executor turns the goal into numbers and calls the generator. If symmetry is over-constrained or widths break legalization, it rolls back from failure logs instead of committing an electrically dead candidate. The Reflector compresses the round into a journal entry for later retrieval.
The layout state is a compact view: device coordinates and connectivity, current parameters, parasitic summaries, and post-layout metrics. No raw polygons, no screenshots. All agents share GPT-5 with role-specific prompts. Weights stay frozen; the policy improves only in context.
Two real OTAs. OTA1 is a 65 nm two-stage Miller amp targeting Gain ≥50 dB, UGB ≥18 MHz, CMRR ≥80 dB, PM ≥60°. OTA2 is a 40 nm fully differential amp with CMFB targeting Gain ≥60 dB and UGB ≥1.5 MHz, same CMRR and PM. Baselines are the generator heuristic, Bayesian optimization on the same knobs, and an ablation without the journal (Ours w/o ICPI). All methods get 31 candidates. The full method simulates post-layout every three rounds, so 31 extractions and 11 post-layout sims; BO simulates every round.
| Circuit | Method | FoM | Area (μm²) | Specs |
| OTA1 | Heuristic | 0.869 | 3592.9 | miss |
| OTA1 | BO | 0.979 | 4036.9 | CMRR 54.89 miss |
| OTA1 | w/o ICPI | 1.003 | 3288.3 | UGB 17.24 miss |
| OTA1 | Ours | 1.104 | 4031.4 | all met |
| OTA2 | Heuristic | 0.696 | 7080.0 | miss |
| OTA2 | BO | 0.880 | 8857.3 | CMRR 62.80 miss |
| OTA2 | w/o ICPI | 0.868 | 6490.5 | miss |
| OTA2 | Ours | 1.038 | 6468.2 | all met |
OTA2's action space is about two orders of magnitude larger than OTA1. Under the same 31-candidate horizon, BO grows area by more than 25% and still misses CMRR. Full ICPI meets all four electrical targets and is smaller than both the heuristic and BO. On OTA1, BO pushes gain and bandwidth hard while CMRR collapses to 54.89 dB; ICPI takes a more balanced point and still wins FoM. BO also commits geometrically legal layouts that do not oscillate (FoM 0). ICPI infeasibilities stop at backend failure and roll back, so every committed candidate is LVS-clean and electrically alive.
Agent overhead is about 37-43 s and 12k-17k tokens per round, 18-21 minutes over 30 rounds, with input context over 90% of tokens. Extraction plus post-layout sim is more than 141 minutes on a conservative lower bound, so the LLM loop is under 16% of wall time. Simulation remains the scarce resource.
This is Reflexion-style test-time improvement wired to a real post-layout loop. The actions are knobs the generator already has, not LLM-drawn polygons. For a MAGICAL-class backend with a few dozen sims to spend, the loop is more sample-efficient than BO and more attributable than natural-language chat. A PDK-free synthetic demo is public so the mechanism can be replayed with another backbone.
It is still incremental. The kernel is MAGICAL place-and-route; the LLM only searches the knob space more efficiently. Other generators and hierarchical blocks are untested.
The authors say it themselves: two OTAs, and both state size and sim cost will get worse on larger systems. FoM does not penalize area, so the OTA1 ICPI layout is almost as large as BO; the area win is OTA2-only. GPT-5 is the only backbone with numbers. The Analyzer has no standalone ablation, and the OTA2 FoM jump from 0.868 to 1.038 versus the no-journal baseline is a single run, so journal versus sampling luck is not separated. Production PDKs are not in the loop.