Repository navigation
Skip parasitic extraction in the Magic LVS script - #320
Conversation
ext2spice drops capacitance and resistance for LVS anyway (cthresh/rthresh infinite), so extracting them only costs runtime. On large sky130 arrays that extraction can run for hours.
|
Linking #245. That 16 KB sky130 run sat in extraction for a month on magic 8.3.363, and it is the same failure mode this PR is about: the parasitic passes dominate on large bitcell arrays and look like a hang. Numbers from our side, all magic 8.3.363, netgen from the conda env:
So this PR removes the parasitic cost, but there is a second, size-dependent cost in the subcell connectivity phase of the parent-cell extraction that #245 most likely hit as well. Profiling it now, will report in #245. |
|
Merged. Thanks — the writeup made this easy to check, and I was able to reproduce the mechanism independently. I confirmed the reasoning in the code:
Measured on scn4m_subm (A/B in two worktrees, DRC and LVS both run):
Device and net counts in the netgen report are identical before and after, and the saving grows with array size (-31% then -36% on extraction, ~-57% on Full regression on freepdk45 + scn4m_subm (30 tests incl. every Magic/netgen DRC+LVS test in my set): identical pass/fail to |
The Magic script that extracts the layout netlist for LVS runs
extract allwith capacitance, coupling and resistance extraction on.ext2spicethen throws all of that away (cthresh infinite,rthresh infinite), so netgen never sees it. On large sky130 arrays the parasitic extraction is most of the runtime and looks like a hang. That matches #248 (2 KB SRAM stuck inrun_extfor a day) and probably #165.This adds
extract no capacitance,extract no couplingandextract no resistancebeforeextract allinwrite_drc_script. Transistor extraction,extract unique alland port matching are unchanged. PEX writes its own scripts and is not affected.Where we hit it
sky130 1rw1r macro, 64 words x 32 bits, OpenRAM v1.2.48, Magic 8.3.363 from the conda environment. The LVS job timed out while the bitcell array
.extwas an incomplete 81 MiB. Rerunning extraction and LVS on the same saved Magic hierarchy with this change took 119 s at 837 MiB peak RSS. The array.extwas 3.9 MiB and netgen matched uniquely, 1694 devices and 1319 nets on both sides. A copy with one PMOS disconnected on purpose still failed LVS.Tests on
dev(3608704)Run before and after the change with Magic 8.3.363, netgen and ngspice from the conda environment, and sky130_fd_bd_sram at the commit in the Makefile (fc63b128). Each test gave the same result both times.
For
20_sram_1bank_nomux_1rw_1ron sky130 I kept the temp directory from both runs. Both match uniquely with 512 devices, andsram.ext.errhas the same messages. Total.extsize went from 7.9 MB to 1.4 MB. The extractedsram.spicediffers only in subcircuit port order and in transistorad/as/pd/ps, which are now 0. The netgenlvscommand is the only reader of that file.I did not run the full regression or freepdk45.