spice-sim
Spice Simulation
Add a small ngspice-backed testbench to a .zen design.
Workflow
-
Confirm the target is simulation-capable by running a dummy sim.
pcb sim <path/to/file.zen> --setup "* empty setup check" -
If the SPICE model is missing, add it. Find a vendor model, download it, or create a simple behavioral model if needed. Wire it through the leaf component with
spice_model=SpiceModel(...)before writing the testbench. -
Create a focused testbench file. Use a generic package-local path such as
<package>/testbench/test_<scenario>.zen. -
Keep the structure simple:
- top docstring
- imports
- nets/interfaces
- module-under-test instantiation
More from diodeinc/pcb
datasheet-reader
Read datasheets and technical PDF documents with `pcb scan`. Use when the user gives a local PDF path or an `http(s)` datasheet/document URL, when a task requires reading, summarizing, extracting information from, or answering questions about a datasheet or technical PDF, or when a KiCad symbol / `.kicad_sym` provides a `Datasheet` property to resolve. Run `pcb scan <input>` in bash, treat stdout as the generated `.md` path, then read that markdown file.
869zener-language
Canonical Zener HDL guidance. Use for any non-trivial `.zen` work or whenever syntax, `Module()`, `io()`, `config()`, imports, `pcb.toml`, stdlib APIs, package APIs, source lookup, generics, DNP patterns, or validation are uncertain.
834reference-design
Grow a component package into a high-quality, sourceable reusable design in Zener. Use when translating a datasheet, application note, or eval design into circuitry that should live with the component package itself — including checking for existing reusable packages first, extracting evidence, choosing sourceable passives, documenting the design in the `.zen` docstring, and validating with `pcb build`.
799component-search
Search for and add electronic components and reusable subcircuits to a Zener PCB project. Use when designing a board, module, or subsystem and you need a part package, a reusable module, or a component package that may already include application circuitry. Covers `pcb search` (registry:modules, registry:components, web:components) and `pcb new component` for importing web components into a workspace.
787idiomatic-zener
Style rules and idioms for writing high-quality Zener HDL code. Use when writing, reviewing, or refactoring `.zen` files — modules, reference designs, or board files. Covers DNP patterns, typed configs, voltage checks, component naming, computation style, and common gotchas.
724git-hunk
Non-interactive hunk and line-range staging with the `git-hunk` CLI. Use when a user wants atomic commits, selective staging, partial hunk staging, or an agent-safe replacement for `git add -p` or `git commit -p`, especially when `git-hunk` is available in the current repo or on `PATH`.
106