/vibe-ic:lvs-triagefrom vibe-ic
Triages Layout-vs-Schematic (LVS) mismatches from Calibre, Netgen, or Pegasus reports. Parses mismatches by category and proposes layer+coordinate fixes.
Ships in vibe-ic. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
LVS proves that the drawn layout corresponds to the schematic / netlist. Mismatches are common in early iterations. This skill reads LVS reports (Calibre, Netgen, Pegasus) and proposes focused fixes.
.rep, Netgen comp.out, etc.).cdl / .sp / .v)lvs/lvs_triage.md:
LVS methodology references: Mentor Calibre user guide, open-source Netgen (http://opencircuitdesign.com/netgen/). Signoff tools: Calibre LVS, Cadence Pegasus, Synopsys IC Validator.
eda_lvs mode=yosys_equiv is structural LEC (yosys equiv_simple+equiv_induct): it proves
Boolean equivalence with a SAT engine. That engine lacks a model for some standard-cell
primitives, so those cells come back "unproven" / sat_model_unsupported_cells — this is a
LIMITATION OF THE SUBSTITUTE TOOL, not a netlist mismatch, and no yosys flag closes it for
all cells (-undef, deeper equiv_induct -seq N, dfflibmap/async2sync only widen it).
To actually cover the unproven cells, switch to device-level LVS (the sky130/gf180 sign-off path — netgen has no SAT-model concept, it matches transistors):
eda_extraction (magic ext2spice, pdk=sky130, output_format=spice) — GDS → flat layout SPICE.lvs <layout.spice> <schematic> with the foundry setup + the supplement, AND the
std-cell SPICE library loaded into the SCHEMATIC circuit so each gate expands to
transistors (else the schematic cells are empty placeholders → a false device-granularity
mismatch). This reaches device-class-exact (e.g. HDLC: 20937 = 20937 devices, all 4 classes
equivalent — the 230 yosys-unproven cells became 0 device-level-unproven; cf. benchmark_clean
sha256 device-exact 12148 = 12148).Expected honest residual when the schematic side is a logic-only Verilog netlist: the tie
cells (sky130 conb_1 = two poly resistors to VPWR/VGND) show their power-side terminals as
disconnected, because a post-PnR Verilog gate netlist has NO power connectivity (grep VPWR = 0).
This is a Category-D Verilog-vs-extracted power-modeling artifact (sha256 documented the same),
NOT a real mismatch — every logic net + all devices match. Closing it fully needs a power-aware
SPICE schematic side. Caveat: eda_lvs mode=netgen's matched flag is currently an unreliable
regex (see ORGANIC-20260531-eda-lvs-netgen-false-positive-and-no-stdcell-lib) — verify against the
real netgen verdict lines ("Circuits match"/"failed pin matching"/device-class equivalence), not
the boolean.
Read the native Netgen/KLayout LVS comparison for the actual selected layout and schematic. Inspect unmatched devices, nets and pins and retain the original PDK comparison rules.
.subckt — two routes (captured v0.1.114)After device-level netgen reaches device-count-exact + classes-equivalent (e.g. HDLC
16393=16393, 0 disconnected nodes), the last residual is often
Final result: Top level cell failed pin matching — because the Magic GDS flat extraction emits
a portless .subckt <top> (empty port list), so netgen's name-matching partition has nothing
to anchor (flat layout nets ≠ schematic nets, disjoint naming). Two general programs close this:
Route A — canonical cause-fix (PREFER): programs/magic_port_extract_emit.py. Emits the
Magic port makeall extraction TCL + the shell preamble. Two prerequisites, both proven on HDLC:
(1) export PDK=<pdk> and PDK_ROOT in the SHELL before magic launches (the system
.magicrc reads $env(PDK) at startup — an in-script set env(PDK) is too late; the
eda_run_tcl engine=magic wrapper currently does NOT export it → see
ORGANIC-20260531-magic-extraction-no-toplevel-ports; drive via docker exec vibeic-eda with the
export preamble). (2) port makeall only promotes labels on the PDK port-purpose layer
(sky130 MET3PIN = GDS 70/16); an OpenROAD GDS-streamout step that put pin text on a drawing
layer (sky130 10/1) yields nothing — relabel 10/1→70/16 (klayout) first. Result on HDLC: a real
port-labeled flat .subckt hdlc_core_flat clk fcs_ok … with 20937 devices, and the netgen
verdict advances past the pin-match-seed stage. (To reach "Circuits match uniquely" the moved
label must also be geometrically snapped to the met3 routing shape so it ties to the net.)
Route B — tool-independent fallback: programs/lvs_def_port_seed.py. Parses ANY DEF PINS
section → ordered (pin, net, direction), and emits both a netgen port-seed TCL and an ordered
port list to inject into the portless .subckt <top> line. Runs NOW, no Magic dependency.
Honest limit (proven on HDLC): name-seeding ALONE does NOT converge a flat extraction whose
internal nets carry Magic auto-names (a_NNNN#) — the injected ports become disconnected pins
(HDLC: 47 disconnected pins). Route B is a partition HINT / audit artifact; when the layout body
has no matching net names, Route A (real label promotion tied to geometry) is genuinely
required — say so rather than reporting a false PASS.
Both are deterministic + pytest-pinned (programs/tests/test_magic_port_extract_emit.py,
programs/tests/test_lvs_def_port_seed.py).
When you are field-verifying a plugin's automation of a recipe the field agent ALREADY proved by hand — the runner's automated run FAILs at some step while the field's manual run SUCCEEDED at that same step — do NOT re-triage the failure from scratch. Chasing the failure text (e.g. a netgen "Netlists do not match" / "failed pin matching") leads to round after round of symptom fixes.
Instead, DIFF what the successful field run fed vs what the runner fed at that step: which netlist, which env var, which extraction path, which artifact version. That single differing INPUT is almost always the plugin's blind spot — the runner's automation silently selected a different (wrong) input that the field, running by hand, implicitly avoided.
Worked evidence (the same GDSII-LVS feature, twice):
exported in the magic-extraction shell, but the
tool that consumes it (netgen) runs in a SEPARATE shell (_docker_exec =
fresh bash -lc per call, env does not persist). Input delta = shell scope.nl
views from the final LibreLane State through _prestream_native.signoff_inputs.Neither root cause is visible in the failure text; both surface INSTANTLY from a field-input-vs-runner-input diff — short-circuiting N rounds of surface fixes. General rule: every field→core handoff where the field has manually proven the recipe — the runner's automation has likely picked a different input than the field did; diff the inputs first.
When you promote a step output from a design-side manually-installed
artifact to runner-auto regeneration — i.e. you move the design-side
artifact aside so the runner freshly selects its own input (the right move to
avoid the #512 input-masking blind spot) — the design-side provenance.jsonl
entry it leaves behind goes stale in two distinct ways, and you must
reconcile BOTH before you can honestly call the design-side→runner-auto switch
"done":
generated_by field
is now wrong (it claims design-side; the file on disk is the runner's). A
byte-identical hash is actually the proof that runner-auto == the
design-side recipe, but it does NOT make the provenance attribution correct.
(繁中:generated_by 過時 — 雜湊雖對,歸屬已錯。)PROVENANCE_OUTPUT_FILE_MISSING / completeness failure.Doctrine: before declaring the switch complete, run the provenance output-hash completeness check, and then either restore the moved-aside declared outputs (regenerate them under their declared names) or supersede the stale entry (write a fresh runner-authored entry so the runner entry is authoritative). Pick restore-vs-supersede by intent, not by reflex.
Worked evidence (spm LVS upgrade): moved aside lvs.rpt +
lvs_netgen_stdout.log; the runner regenerated lvs.rpt (byte-identical hash —
runner-auto result == design-side recipe) but did NOT regenerate the stdout log
under that name → the stale entry's declared log was missing → P0 provenance
FAIL; restoring the log fixed it.
why_not_bucket_a: deciding whether a given stale entry should be superseded (runner now owns it) or have its outputs restored depends on whether the runner wrote its own replacement entry AND whether a byte-identical output is semantically the runner's — a provenance-intent judgement, not a fixed rule. The deterministic residual (the completeness check that catches a missing declared output) already exists and fires correctly; this section is the judgement layer over it. So when you switch a design-side artifact to runner-auto, treat the provenance reconciliation as a required closing step, not an afterthought.
When the final Magic.SpiceExtraction of a sealed SKY130 chip fails with
"Encountered one or more fatal errors while running Magic." and Netgen LVS/PERC
then have no SPICE, read the extraction log before touching LVS. If every
Error while reading cell ... Unknown layer/datatype names a PDK seal-ring cell
(sr_polygon*, nikon_sealring_shape, sealring_slots, seal_ring_corner)
on foundry marker/mask layers (81/51, 81/52, 61/20, 22/22, NN/0 masks), the
defect is the read mode, not the layout: the PDK generator documents those
layers as outside the user-facing tech and meant for vendor-GDS use, and
LibreLane's own Magic.DRC reads the same finished stream with
gds noduplicates true; gds readonly true. Read it the same way in the chip's
extraction rc (flow_chip_inputs.py, extraction-only block); do not lower
MAGIC_CAPTURE_ERRORS, filter the log, drop markers from the stream or edit the
seal ring. Prove it with an A/B on the real sealed stream: SPICE and every
.ext must be identical between the reads, only the read errors disappear.
Measured (cpu_queue sha256-sealed-extraction-vendor-i0476-cl, image 0.4.76,
sealed Subservient v1.40.67 chip): ordinary read 37 errors -> step FAIL;
vendor read 0 errors, SPICE byte-identical (53006 lines, 51196 X), 107/107 .ext
identical, illegal overlap measured 27, Netgen LVS 0 errors (2464 = 2464
devices, circuits match uniquely). A read error on any non-PDK cell is still a
real defect: KLayout DRC/XOR read every layer and stay the check for it.
When a chip's Magic.StreamOut (or any Magic step that reads PAD_GDS) fails
with "Encountered one or more fatal errors while running Magic." and every
counted line is Error while reading cell "<pad>" ...: Rewinding input. Cells may have been instanced before they were defined. Consider using "gds ordering on",
the pad library instances cells defined in another library file and the PDK's
gds_import_io.tcl (gds flatten + flatglob) makes Magic fall back to rewinding;
LibreLane's output processor counts each rewind as fatal. Set Magic's own
gds ordering true in the chip rc (flow_chip_inputs.py), after the PDK rc and
IO recipe. Do not lower MAGIC_CAPTURE_ERRORS, filter the log or substitute the
KLayout stream. Measured (cpu_queue sub-ic-pad-gds-magic-ordering-ab2-v14620-i053-cl,
image 0.5.3, sky130 PAD_GDS): ordering off 21 fatal lines, on 0; all 57 ef_io
cells XOR 0 between the two reads.
/drc-fix/eco-plan log/rtl-repair or /analog-layoutFor a Magic-gencell MOS parameter mismatch, inspect the selected PDK converter and the native drawn dimensions before changing the design or tolerance. A PDK can quantize each finger separately; snapping total W once can disagree at grid boundaries and can falsely accept wrong geometry. Hand-written rounding, an epsilon or a wider matching tolerance is not a substitute for the native answer.
Use the existing analog comparison-preparation path to obtain supported dimensions from the selected runtime's PDK conversion and Magic drawing. Apply the answer only to the comparison representation. Preserve source SPICE/CDL, layout, W/L intent, multiplicity, finger count, terminal mapping and PDK matching tolerances. Keep unsupported or incomplete native answers on the existing fallback and disclose that scope; do not claim all MOS syntaxes were natively resolved. Preserve native rejection of genuinely wrong layouts. A correct comparison width or a passing preparation control alone does not establish LVS or block signoff.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub vibeic/vibe-ic --plugin vibe-ic71 skills in this plugin
/ams-simPlan and run analog / mixed-signal simulations — DC op, AC, transient, Monte Carlo, corner sweeps, PSRR/CMRR, noise — using ngspice, Xyce, Spectre, or HSPICE, and triage the results. Use when the user says "SPICE", "ngspice", "Monte Carlo", "corner simulation", "analog sim", "AC analysis", "transient", "PSRR", "CMRR", "noise analysis"./analog-extraction-resimPost-layout parasitic extraction + re-simulation for analog blocks — compares pre-layout vs post-layout specs. Use when the user says "post-layout resim", "extract and resimulate", "parasitic check", or at Step A7 of the analog track./analog-flow-orchestrateOther plugins' skills for the same job