/analog-design-modeling:behavioral-modelingfrom analog-design-modeling
Authors, compiles, and validates analog behavioral models (Verilog-A, VHDL-AMS, SystemVerilog RNM) and connect modules for AMS verification and system simulation.
Ships in analog-design-modeling. 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.
None: SKILL.md is the whole skill.
analog-chip-design-agents:behavioral-modeling-orchestrator agent and pass the full user
request and any available context. Do not execute stages directly.behavioral-modeling-orchestrator mid-flow (including fix-request
servicing): do not spawn a new agent. Treat this file as read-only — return the requested
stage rules, sign-off criteria, or loop-back guidance.Spawning the orchestrator from within an active orchestrator run causes recursive delegation and must never happen.
Before executing or advising on any stage, read the following if they exist:
memory/modeling/knowledge.md — known Verilog-A idioms, OpenVAF/ADMS quirks, convergence
recipes, RNM pitfalls. Incorporate its guidance into every authoring decision.memory/modeling/run_state.md — current run identity (run_id, design_name, pdk,
last_stage) for resume-after-interruption.Author, compile, and validate analog behavioral models and the connect modules that bridge analog and digital domains — the "analog HDL" capability. Six stages with explicit QoR gates and loop-back criteria enforced by the behavioral-modeling orchestrator. A model is only signed off when it is both accurate (vs a SPICE reference) and faster than SPICE.
openvaf) — Verilog-A → OSDI compiler for ngspice / Xyce; the primary pathadmsXml) — legacy Verilog-A → C model generationngspice) / Xyce (Xyce) — OSDI loading + model-vs-SPICE co-simnettype/wreal) via Verilator (verilator) / Icarus (iverilog)python -m hdl21) — programmatic (Python) analog HDLghdl) — limited VHDL-AMS supportxrun) — Verilog-AMS / Verilog-A referencespectre) — Verilog-A in Spectrevcs) — AMS co-simnettype/wreal) for fast event-driven signal-flow; VHDL-AMS (GHDL-AMS, limited) only when mandated.design_state.constraints.specs (gain, BW, noise, offset) so the model is spec-traceable.constraints.specs/rf_specs| Issue | Fix |
|---|---|
| RNM chosen for a conservation-law block | Switch to Verilog-A (RNM cannot carry KCL/KVL) |
| No SPICE reference identified | Pick the circuit-design netlist (design_state.circuit.netlist) or a reference cell |
| Tolerance left implicit | Fix the error tolerance from the modelled spec before authoring |
electrical disciplines, use branch/contribution operators (<+), and gate parameter computation with @(initial_step) — never recompute constants every evaluation.$limexp, tanh-smoothed clamps, and ddx-friendly forms to keep the Jacobian well-conditioned (avoid hard if discontinuities on solution variables).from [...] ranges and provide physical defaults; emit $strobe/$error only outside the inner solve loop to avoid convergence noise.white_noise, flicker_noise) so model-vs-SPICE noise comparison is meaningful.wreal/nettype resolution functions and quantize/threshold at digital boundaries; never let wreal 'z/'x propagate into arithmetic.| Issue | Fix |
|---|---|
Hard if on a solution variable | Replace with $limexp/tanh-smoothed transition |
| Constants recomputed every step | Hoist to @(initial_step) |
RNM x/z propagating into math | Add resolution/threshold at the boundary; default wreal to a finite value |
tool_error; a convergence-shaping construct failure as convergence.| Issue | Fix |
|---|---|
| OpenVAF compile error (unsupported construct) | Replace with an OSDI-supported form; remove non-differentiable if on solve vars |
| OSDI loads but won't instantiate | Check discipline/nature mismatch and port order vs the netlist |
| Non-convergence when OSDI loaded | Smooth discontinuities ($limexp/tanh); add small conductance to floating nodes |
constraints.supply.vdd_v) and drive strength / impedance.supply.vdd_v (corner-robust)| Issue | Fix |
|---|---|
| Connect module missing at a boundary | Add an explicit connect rule; disable reliance on implicit insertion |
| Fixed thresholds break at corner Vmin | Parameterise VIH/VIL vs supply.vdd_v |
design_state.circuit.netlist if present, else a reference cell) on matched stimuli; compute model-vs-SPICE error % on the spec-bearing outputs (gain, BW, offset, noise).functional (behaviour wrong) or spec_violation (quantitatively off the spec it models).| Issue | Fix |
|---|---|
| Model-vs-SPICE error > tol | Add the missing parasitic/noise term; refine parameter extraction from the reference |
| Low sim speed-up | Hoist constant computation to @(initial_step); reduce internal nodes |
| RNM coverage low | Add directed stimulus exercising the unhit behavioural arcs |
| Check | Criterion |
|---|---|
| Compile | OSDI compiles clean (0 errors), loads in ngspice/Xyce |
| Accuracy | model-vs-SPICE error ≤ tolerance on all spec-bearing outputs |
| Speed-up | ≥ target speed-up factor vs the SPICE reference |
| RNM coverage | ≥ target toggle/branch coverage (RNM models) |
| Connect modules | 100% boundary coverage, explicit rules |
design_state.modeling.functional/spec_violation)tool_error (regenerate); model-shaping non-convergence → convergenceconnectivitySee plugins/meta/skills/pipeline-orchestration/SKILL.md §Constraints Schema for the authoritative schema and stage-entry validation rule.
Required at entry (model_planning) — hard-fail if missing:
constraints.specs/rf_specs entry, or an explicit
per-block spec passed in (e.g. from architecture.blocks[])Required at connect_rule_setup (only if the model has analog↔digital boundaries):
constraints.supply.vdd_v — for supply-relative connect-module thresholdsOptional:
constraints.pdk — modeling is technology-light; absence is not a failureSkip constraint validation entirely when invoked in fix-request-servicing mode (a
fix_request.id was passed in the prompt).
Write memory/modeling/run_state.md as the first action before launching any tool:
run_id: modeling_<YYYYMMDD>_<HHMMSS>
design_name: <design>
pdk: <pdk or unknown>
tool: <primary tool>
start_time: <ISO-8601>
last_stage: null
Update last_stage to the completed stage name only after each stage finishes successfully.
After each stage completes, upsert one JSON record in memory/modeling/experiences.jsonl
keyed by run_id (do not append a second line for the same run). key_metrics fields:
model_error_pct, sim_speedup_x, rnm_coverage_pct. Set signoff_achieved: false until
model_signoff passes; then true. Create the file and parent directories if they do not exist.
If mcp__plugin_ecc_memory__add_observations is available, emit each applied fix as an
observation to entity analog-design-modeling-fixes after writing to experiences.jsonl.
Skip silently if absent — the JSONL file is the canonical record.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub hdl-tools/analog-chip-design-agents --plugin analog-design-modelingOther plugins' skills for the same job