Skip to content

test: export_design's refusal of a pin on two nets is checked on two real designs - #333

Merged
valentinozegna merged 1 commit into
mainfrom
test-export-refusal-real-designs
Dec 1, 2026
Merged

valentinozegna merged 1 commit into
mainfrom
test-export-refusal-real-designs

Conversation

@valentinozegna

Copy link
Copy Markdown
Contributor

Summary

  • export_design's refusal of a pin on several nets is now tested on two real Cadence designs, where it was tested on hand-built netlists.
  • The fixtures submodule moves to test-fixtures Serialize export_cadence_netlist to prevent license conflicts #19, which adds them: labcomm-projecton (an LM324 whose supply pins are wired to different nets on two sections) and scr-236 (two 74HC14s whose supply pins are wired on one section and left unwired on the others).
  • Neither design can have a golden file, because a Universal Netlist gives each pin one net. The golden test and npm run golden skip a design with a pin on several nets.

No shipped code changes: tests, a developer script and its docs.

Decision tables

No table-covered logic changed: tests and the golden generator only.

Verification

Verdict: PASS. Driven with the released v1.16.1 binary and the golden generator on the two new fixtures; DIGITAL_CONVERTOR is the probe that an ordinary design still gets its golden.

$ npm run golden -- cadence SCR-236 test/fixtures/cadence/scr-236/SCR-236.dsn
Parsing: cadence/SCR-236
  Components: 543, Nets: 388
  Skipped: cadence/SCR-236 (a pin is on several nets)
$ npm run golden -- cadence LABCOMM_PROJECTON test/fixtures/cadence/labcomm-projecton/LABCOMM_PROJECTON.DSN
Parsing: cadence/LABCOMM_PROJECTON
  Components: 27, Nets: 31
  Skipped: cadence/LABCOMM_PROJECTON (a pin is on several nets)
$ npm run golden -- cadence DIGITAL_CONVERTOR test/fixtures/cadence/digital-convertor/DIGITAL_CONVERTOR.DSN
Parsing: cadence/DIGITAL_CONVERTOR
  Components: 15, Nets: 14
  Unchanged: cadence/DIGITAL_CONVERTOR
$ universal-netlist export_design test/fixtures/cadence/labcomm-projecton/LABCOMM_PROJECTON.DSN --output out.netlist.json; echo exit=$?
{"error":"U10.4 is on 2 nets (+10V, N5769); U10.11 is on 2 nets (-10V, N5793). A Universal Netlist gives each pin one net, so this design cannot be exported until each pin is wired to one net."}
exit=1
$ universal-netlist export_design test/fixtures/cadence/scr-236/SCR-236.dsn --output out.netlist.json; echo exit=$?
{"error":"U9.14 is on IN_VCC and also left unconnected; U9.7 is on GND_PT_IN and also left unconnected; U11.14 is on IN_VCC and also left unconnected; U11.7 is on GND_PT_IN and also left unconnected. A Universal Netlist gives each pin one net, so this design cannot be exported until each pin is wired to one net."}
exit=1
$ universal-netlist query_component test/fixtures/cadence/scr-236/SCR-236.dsn --refdes U9 | jq -c .pins[\"14\"]
{"name":"VCC","net":"IN_VCC","type":"input"}

Test plan

  • npm run type-check && npm run lint && npm test: 3,274 passed, 48 skipped

🤖 Generated with Claude Code

https://claude.ai/code/session_01CX9foWaSqDdUdHWrGa56Wn

…real designs

labcomm-projecton and scr-236 join the fixtures. Neither can have a golden, so the golden test and gen-golden skip a design with a pin on several nets.
@valentinozegna
valentinozegna merged commit 072bcd9 into main Dec 1, 2026
3 checks passed
@valentinozegna
valentinozegna deleted the test-export-refusal-real-designs branch December 1, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant