SPICE netlist wires the wrong node to a subcircuit port when an earlier pin is unconnected

Open Beginner friendly
#334 0 comments 0 reactions 0 assignees View on GitHub

@anirudh12032008 is already working on this.

Since Nov 28, 2026.

  • #335 by @anirudh12032008 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
tooling

Research direction

Start with add_subcircuit_to_circuit, where positional nodes are built, and inspect how unconnected pins are skipped. Reproduce with a three-pin subcircuit, assigning only pins 1 and 3 before calling generate_netlist(). Done means the netlist preserves the missing pin position with an NC_X1_2 node, and a regression test covers the shifted-port case.

Written by the indexing model from the issue text.

Description

With a .subckt tri p1 p2 p3 part, connecting only p1 and p3 gives

X1 a c tri

so c ends up on p2 instead of p3. add_subcircuit_to_circuit skips unconnected pins when building the positional node list, so everything after the gap shifts down one port. Expected something like X1 a NC_X1_2 c tri.

Repro: load a lib with that subckt, tri[1] += a; tri[3] += c, generate_netlist().

Dominant language
Python
Stars
1.7k
Forks
184
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from devbisme/skidl

All issues in devbisme/skidl

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.