/vibe-ic:analog-extraction-resimfrom vibe-ic
Extracts parasitic RC from Magic layout and re-simulates analog blocks across PVT corners to detect layout-induced performance degradation vs pre-layout specs.
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.
After analog layout in Magic, extracts parasitic RC and re-simulates across PVT corners to check for layout-induced performance degradation. Compares pre-layout vs post-layout results and flags regressions.
analog-layout has produced a Magic .mag fileanalog/<block>/layout.mag — Magic layout fileanalog/<block>/corner_results.json — pre-layout SPICE results (baseline)analog/<block>/spec.json — specs for pass/fail comparisonprograms/magic_extract_spice_emit.py (do not hand-write the recipe):
# emit the deterministic .mag -> RC-annotated .subckt extraction TCL
python3 programs/magic_extract_spice_emit.py --block <block> \
--out-spice analog/<block>/<block>_extracted.spice --out extract.tcl
# or validate an existing extraction TCL (FAILs if it omits `extract all`
# or `ext2spice lvs`, AND if it puts them in an order magic will not
# honour — the silent causes of a vacuous 0% degradation)
python3 programs/magic_extract_spice_emit.py --validate extract.tcl
Then run it via eda_extraction (or magic). Output:
analog/<block>/<block>_extracted.spice.
The recipe's order is the product, not just its command set (vibe-ic#1953). Measured on magic 8.3:
ext2spice lvsRESETS cthresh/rthresh toinfinite, so the thresholds must be asserted after it;extresistreads the.extthatextract allwrites, so it runs after the extract; andext2spice rthresh <float>is a parse error magic silently refuses (it wants an integer). All of this is enforced byprograms/magic_extract_spice_emit.py(distinct from the GDS-read + port-promote LVS recipe inmagic_port_extract_emit.py).
1b. Audit what magic actually WROTE — mandatory, before any re-sim. A recipe that validates can still yield a parasitic-free netlist if the tool or PDK refuses; the only way to know is to read the output.
python3 programs/magic_extract_spice_emit.py \
--audit-netlist analog/<block>/<block>_extracted.spice \
--res-ext analog/<block>/<block>.res.ext
Exit 1 = the netlist carries 0 R and 0 C. Re-simulating it
re-simulates the pre-layout circuit, and the pre-vs-post comparison in
step 3 is a false 0% degradation. Do not proceed; fix the extraction.
Exit 0 prints the depth achieved — RC or C_ONLY. C_ONLY is a
real, common outcome (magic 8.3 / sky130A emits no R elements even with
resistance extraction fully armed), and it is passable but must be
disclosed: carry "parasitic_depth": "C_ONLY" into pre_vs_post.json
_provenance so no reader mistakes it for full RC. If the block's claim
genuinely needs series R, add --require-resistance and take the honest
FAIL rather than a silent capacitance-only substitution.
Re-simulate with extracted netlist:
eda_spice_corner with same corners as pre-layoutanalog/<block>/post_layout_corner_results.jsonCompare pre vs post — run the deterministic checker; do not re-grade by hand:
Compare native pre-layout and extracted post-layout simulations at matching corners and stimuli. Keep the original spec limits and declared degradation bands; report missing parasitics, models or simulated corners explicitly.
It computes per-metric per-corner degradation (post - pre) / pre × 100% and
classifies it against the canonical degradation bands, which the program owns
(single source of truth — see "Degradation thresholds" below). Do NOT hardcode a
different ERROR/WARNING cutoff in your report; quote the program's verdict.
analog/<block>/pre_vs_post.jsonWrite it at phase3/analog/<block>/pre_vs_post.json — the canonical analog
dir (_path_layout.analog_dir), which is what the A7 gate globs.
Compare native pre-layout and extracted post-layout simulations at matching corners and stimuli. Keep the original spec limits and declared degradation bands; report missing parasitics, models or simulated corners explicitly.
{
"block_name": "ldo_1v8",
"pre_layout_file": "corner_results.json",
"post_layout_file": "post_layout_corner_results.json",
"comparisons": {
"gain_db": {"pre": 62.3, "post": 58.1, "degradation_pct": -6.7, "status": "OK"},
"ugb_mhz": {"pre": 11.2, "post": 7.5, "degradation_pct": -33.0, "status": "ERROR"},
"vout_dc": {"pre": 1.8002, "post": 1.7998, "degradation_pct": -0.02, "status": "OK"}
},
"worst_degradation": {"metric": "ugb_mhz", "pct": -33.0},
"overall_status": "NEEDS_RELAYOUT"
}
Accepted spellings (exactly what the gate parses — nothing else is read):
| position | accepted keys |
|---|---|
| container | comparisons (preferred) or specs |
| container shape | dict of {metric: {…}}, or list of {"name": …, …} |
| pre value | pre_layout or pre |
| post value | post_layout or post |
Both values must be numeric and pre must be non-zero, otherwise that metric
is not counted. A file in which NO metric is comparable FAILs
PRE_VS_POST_ZERO_COMPARED — a comparison gate must never report PASS having
compared nothing.
If every compared metric's post value is exactly equal to its pre value,
the artefact must NAME the post-layout artefact its post column was simulated
from, and that artefact must exist on disk. Otherwise both gates over this file
FAIL *_ALL_ZERO_DELTA_UNEVIDENCED.
This is not a style rule. A degradation gate fed a post column copied from the
pre column can only ever compute 0 %, which is its most acceptable tier — so a
copy scores better than every honest comparison, and PRE_VS_POST_ZERO_COMPARED
does not see it (a copy is N comparisons of a number against itself, not zero
comparisons). An all-zero result that carries its provenance is a legitimate
(if surprising) measurement and still passes.
Accepted evidence keys, read at _provenance.<key> and at the top level:
| key | what it should point at |
|---|---|
extracted_netlist | <block>_extracted.spice from step 1 |
post_layout_netlist | same, alternative spelling |
post_layout_corner_results | post_layout_corner_results.json from step 2 |
post_layout_file | either of the above (the spelling used in the example) |
{
"_provenance": {"extracted_netlist": "ldo_1v8_extracted.spice"},
"comparisons": { "...": {} }
}
Relative paths resolve against the block directory, then the project root. The
named file must be non-empty, inside the project, and must not be
pre_vs_post.json itself or the pre-layout corner_results.json it is compared
against — neither of those is a post-layout measurement.
If the layout is a placement-only PV vehicle and no extraction was run, do NOT copy the pre-layout column into the post column: A7 has not happened, and an artefact that says it has is worse than an absent one.
OK / WARNING → analog-hardmacro-gen (Step A8)NEEDS_RELAYOUT → back to analog-layout (Step A5)post_layout_corner_results.json → native post-layout versus pre-layout result reviewA declared PRE deck must resolve the same include targets after its execution directory is published into reports. Resolve includes in the producer before the move, using the existing contextual include helper, and leave the canonical DUT and testbench unchanged. POST reuses the measured PRE stream with the same runtime PDK startup and staged model search order. A missing or changed PRE input remains unmeasured; do not launch another PRE run to hide that refusal.
Before accepting a pre/post comparison, enumerate the source-bound studies in its requested scope. Carry each completed study's deck, analysis, load, corner and selected extraction style into its post-layout counterpart; repeating the first operating point does not measure the other required studies. Preserve the native values and their attributed pre/post pairing, not just a shared alias or corner label. Missing studies and producer failures remain visible by context.
Compare each result against its original source bounds and analysis requirement. A supporting observation from another analysis or load does not replace the required measurement. For a regulation-dependent upper bound, retain the paired native output measurement at that operating condition and verify regulation against its original limits before crediting the bound. An unattributed alias, an unqualified bound or a reused failed result cannot establish PASS. Keep unmeasured obligations separate from the contexts that genuinely passed; neither an added study nor a valid numerical pair establishes complete post-layout closure.
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-flow-orchestrateCanonical reference doc for the Analog A1-A9 track — spec extraction → topology → netlist → corner sweep → layout → per-block PV (DRC/LVS) → post-layout resim → hardmacro → HIL. Used when an agent wants to walk the A1-A9 plan step-by-step. For unified one-command execution (deterministic runner + AI fall-through + final audit aggregated), prefer the slash command `/vibe-ic-analog` (v1.6.13+) which merges this skill's workflow with `analog_one_shot_runner.py`./analog-hardmacro-genOther plugins' skills for the same job