/vibe-ic:analog-topology-selectfrom vibe-ic
Recommends circuit topology for analog blocks (LDO, oscillator, etc.) based on spec.json and PDK device constraints. Use at Step A2 of the analog track or when asked about circuit architecture.
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.
Given a block's spec.json (from analog-spec-extract) and PDK device characteristics, recommends a circuit topology. This is the highest-leverage decision in analog design — wrong topology wastes 10+ sizing iterations; right topology converges in 1-2.
analog-spec-extract has produced spec.json per blockanalog/<block>/spec.json — from analog-spec-extractprograms/pdk_registry.json under the per-PDK analog_device_params
block (vth_n_v, vth_p_v, nominal_supply_v). Look them up by PDK
name; the A2 gate (programs/analog_a2_topology_select_check.py) and
analog-sizing-loop consume the same registry field.
(canonical reference: GF180 nfet≈0.65V/pfet≈0.70V/3.3V; SKY130 nfet≈0.45V/pfet≈0.47V/1.8V.)
2b. The MEASURED half of that same field (vibe-ic#1962) —
analog_device_params.measured, read with
programs/pdk_analog_device_params.py and produced by
programs/pdk_analog_characterize.py. It carries what the declared
constants above do not: k_prime_n_ua_per_v2 / k_prime_p_ua_per_v2, the
threshold the square-law fit implies, vgs_at_id_*_v, rsheet_ohm_per_sq
(+ r_end_ohm) and cap_area_ff_per_um2 (+ cap_perim_ff_per_um), per
process corner, each attributed to the primitive and the model-lib section
it was measured on and each carrying the fit residual that says how well the
model describes the device. analog_a2_topology_emit puts these into
topology.json as pdk_measured_params, so a library device_param_exprs
entry may be written against one of them by name. A family with NO record
quotes nothing and says so — never a default, never a neighbouring family's
number.These templates are from analog-sizing/PRACTICAL_NOTES.md — all verified working on GF180 with ngspice:
Recommended: NMOS-input diff pair + PMOS active mirror + PMOS series pass transistor
Recommended: Current-starved 5-stage ring oscillator
Recommended: PMOS diode offset + resistor divider + 2-inverter chain + weak PMOS feedback + RC delay
Recommended: Brokaw bandgap (CTAT + PTAT summing)
Recommended: Folded-cascode + latch output stage
spec.json and identify block typevth_n_v / vth_p_v / nominal_supply_v from
programs/pdk_registry.json (analog_device_params), do NOT guess.
When the family has been characterized, prefer the MEASURED
vth_*_extracted_v for a headroom argument about a device in
saturation: it is the threshold the square-law fit of THIS process
implies at a stated bias, whereas the declared value is a model-card
constant. Both are in the record; quote which one you used.
The headroom feasibility itself stays judgment: you must read each
candidate's schematic to count how many devices are stacked between
the rails and pick realistic Vdsat/Vov margins (the spec gives no
n_stacked or Vdsat field, so there is no deterministic value to
program — see "Do not / headroom" below). Then check
available = Vdd - Σ(Vth + Vdsat over the stack) ≥ 0 per candidate.topology.md with:
analog/<block>/topology.md — one file per block:
# Topology — <block_name>
## Selected: <topology_name>
## Schematic
<ASCII schematic or description>
## Device roles
| Device | Role | Key constraint |
|--------|------|----------------|
| M1,M2 | Input diff pair | Vgs > Vth + Vdsat_tail |
| ... | | |
## Trade-off analysis
| Candidate | Pros | Cons | Verdict |
|-----------|------|------|---------|
| NMOS-input OTA | Wide CM range at 3.3V | Higher noise | Selected |
| PMOS-input OTA | Lower noise | CM range too narrow | Rejected |
## PDK constraints applied
- Vth(N), Vth(P), Vdd — quote the exact values you looked up from
pdk_registry.json analog_device_params for this PDK → requires ...
- No inductors → ring oscillator instead of LC
programs/pdk_registry.json (analog_device_params); GF180's ≈0.65V
invalidates many textbook topologiesn_stacked or Vdsat margin to make
the headroom check a program. The Vth/supply constants are programmatic
(registry), but how many devices stack between the rails and the per-device
Vdsat depend on the candidate schematic and bias point — that is genuine
analog judgment, not a deterministic table lookup.analog/<block>/topology.md → /analog-sizing (Step A2, continued)Keep gain, noise and current allocations in the topology as design data, with
their formulas and document sources. They are not acceptance limits. A native
budget_studies declaration names the document row and the measured scope;
compare supply usage with that row's maximum current, never with its minimum
load or a private allocation. Explicitly retained native results may be reused
when the circuit and conditions have not changed; read the simulator log for
the number. Otherwise run the declared analysis on the delivered circuit:
OP for a static bias target, transient averaging for clocked operating current.
Supply current of a clocked block is its average over whole clock periods of
clocked operation, after start-up: bind a transient statistic with an explicit
window (for a converter, one complete conversion window) and state every
stimulus that moves with the rail under test, including the clock amplitude
and the references. Bind the actual clock port with testbench.clock_port or
the existing loop_probe.clock_port, then map it through the delivered block
instance. A periodic source on a power or data port does not declare a clock.
A static operating point with the clock held can settle on
a mid-rail root of the logic and is not graded for such a block; neither is an
operating point outside its rails. Run each corner as its own native job and
retain the results. Save only the vectors the measurement names.
For an ENOB bound, use SINAD = 6.02 * ENOB + 1.76 dB with the documented
full scale, sampling rate and OSR to derive the allowed in-band noise. When
the input range is defined relative to the converter reference, use that
reference's target value for the target ENOB condition; its permitted variation
is not the full scale. Record the chosen document field and source line.
When binding a documented full input range, record convention=peak_to_peak
in its structured full-scale binding using IEEE 1241; no further user input
is needed. A full-scale reference alone does not declare an amplitude's
meaning. The consumer must preserve missing-convention refusals and any
explicitly documented RMS, peak or peak-to-peak amplitude convention, and
convert that actual source quantity to RMS before applying the SINAD bound.
Compare total input-referred RMS noise from the simulator's noise analysis
over that band. Missing document inputs or native noise remain NOT_MEASURED;
do not substitute static power, a single sub-block, or a transient ENOB result.
No documented gain bound means no gain check. The later ENOB requirement stays
unchanged and still needs its own native measurement.
Pattern: When the analog block class is delta_sigma_adc or delta_sigma_modulator, the canonical SC topology that Analog A2's primitive panel must recognize is: TWO switched-capacitor integrators (NMOS-input two-stage Miller OTA + Cs/Ci + two-phase non-overlapping switches) + 1-bit clocked comparator (preamp + cross-coupled regenerative latch) + 1-bit feedback DAC (±Vref select switches). This is the CIFB (cascade-of-integrators with distributed feedback) topology, the textbook 2nd-order ΔΣ.
When to apply: Analog A2 topology selection for blocks whose L5 spec names delta_sigma, delta-sigma, incremental ΔΣ, or SC modulator. Also applicable for sub-blocks of a higher-order ΔΣ ADC chain.
What to do: Author topology.md listing: opamp (two-stage Miller, NMOS input pair, PMOS load + class-AB output), comparator (StrongARM-style or preamp+latch), SC integrator (Cs/Ci ratio sized for stability + gain), 1-bit DAC (CMOS analog mux on Vref±). For higher orders, extend to cascaded integrators with distributed/feedforward coefficients.
Worked example (from u_hawaii_adc): u_hawaii_adc A2: prior A2 panel rejected delta_sigma block-type (no transistor/primitive keyword match). The skill-authored topology.md named opamp/comparator/SC integrator/DAC as transistor-level primitives → A2 PASS. Real ngspice on the resulting netlist showed UGBW 1.81-14.93 MHz across 9 corners (> 1 MHz fclk → integrator settles).
Why this is GENERAL: Standard textbook ΔΣ topology (any Schreier / Norsworthy reference). Applies across audio ADCs, sensor readout, incremental high-resolution conversion. Doesn't depend on the specific spec target.
Captured by benchmark-enhancement-capture 2026-05-28.
Pattern: When L5 explicitly states the number of analog block TYPES (a sentence like "the chip contains N analog blocks", or a "Block A / Block B / …" table whose header rows enumerate the blocks), treat that enumeration as the authoritative block roster. Any candidate block carried into A2 whose:
spec is null (no electrical numbers were ever bound to it in A1), ANDis presumed SPURIOUS. Do NOT spend any sizing/topology compute on it until you have confirmed it against the L5 enumeration. If the L5 type list does not include a block of that class, drop the candidate (it was an L1-name false-positive); if L5 does enumerate it, the block is real — proceed, and bind its spec from the L5 entry.
Multiplicity rule: a block's multiplicity (×N — "four identical comparators",
"dual LDO") must come from that block's OWN table-header / enumeration entry, never
from a sibling block's evidence paragraph. A "×4" stated in the LDO row does not make the
comparator a ×4 block. Read each block's own enumeration row for its own count; if the
block has no count of its own, it is ×1.
When to apply: A2 topology selection, as the first sanity pass over the A1 block list, before mapping any candidate to candidate topologies. Cheapest possible gate — one read of the L5 enumeration saves 10+ wasted sizing iterations on a phantom block.
What to do:
spec == null, check whether its only provenance is an
L1 product-name keyword. If so, require an L5 enumeration entry to keep it.Why this is GENERAL: every analog datasheet that enumerates its blocks (count or Block-table headers) admits this check; it names no chip and depends on no SKU. The provenance test (null-spec + name-only evidence) is a structural property of the A1 output, not a hard-coded block list.
why_not_bucket_a (cannot be a deterministic deny-list): whether a product-name-matched
block is real cannot be safely deny-listed. Some chips' blocks genuinely appear only in the
datasheet/product name (the name is the evidence), so a static "ignore name-only blocks"
rule would silently delete real blocks. The decision requires reading the L5 enumeration
to confirm-or-deny each candidate — a judgment over prose/table semantics, not a regex over
the block name. The program's job stays "surface every name-keyword hit" (recall floor in
analog-spec-extract); the confirm-against-L5 judgment is the residual LLM step.
Captured by benchmark-enhancement-capture 2026-06-06 (#466B).
Before comparing a clocked block's supply usage with its document bound, read which analysis produced the number. A static operating point with the clock held low does not measure average current during conversion. Digital nodes can also settle at a metastable DC root. Retain that OP as a bias diagnostic; do not use it to decide a clocked-operation current requirement.
Use the delivered circuit and its declared operating stimulus. Read the native transient average over the declared steady conversion window, spanning whole clock cycles after startup. Compare only the corners and operating conditions actually measured, against the unchanged document limit. Missing operating measurements remain NOT_MEASURED.
On the delta-sigma ADC at 1.3 V, clock-stopped FF/-40 C OP reported 1.01247 mA against the 1 mA supply bound; FF/27 C reached a different DC root at 3.65155 mA. Neither is a conversion-current measurement. A completed TT/125 C transient at the declared 1.2823 MHz maximum clock reported 0.581586 mA over 400.062 to 799.345 us. That result is one operating corner, not an FF comparison or a full-corner PASS. The clocked-current producer and remaining corner results belong to the analog implementation recovery.
Read the native transient log and the measurement's actual interval before
using its value. ngspice can exit 0, print a numeric zero and even print its
normal completion banner after Timestep too small and tran simulation(s) aborted. An average whose reported end does not reach the declared window
has not measured that window. Keep the abort and partial trace as diagnostics;
report the operating quantity as NOT_MEASURED, not as zero current or a
passing budget. This does not change a simulator option or the original bound.
The ADC FF/-40 C, 1.3 V transient stopped at 68 us. Its native log reported
supply_current = 0.00000e+00 from=5.13000e-04 to=6.80000e-05 and
ngspice-47 done, while the command returned 0. The requested average began
at 513 us, after the analysis had already stopped. The zero therefore cannot
be compared with the 1 mA limit. Diagnose the convergence failure separately;
only a completed native interval can supply the operating measurement.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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