Hi all,
I’m a hardware engineer using QSPICE for signal-integrity study. Recently I started letting an AI assistant
build my example circuits for me, and it had to produce real schematics — not netlists — so that I can
open them, click nodes, and run them.
Scope first, because I’d rather ask than assume: we did not decompile, disassemble, patch or modify
QSPICE in any way. We only read files that QSPICE itself writes when you save a schematic (.qsch) or run a
simulation (.cir, .qraw), and we generated our own .qsch files in that same format. If that is not
acceptable under the EULA, please tell me and I’ll stop — and if it is fine, a short note in the docs would
save the next person a week.
Sharing what we learned in case it’s useful, plus a few “is there an official way” questions.
What we found (all verified against the installed QSPICE)
File envelope
bytes: FF D8 FF DB AB "schematic" \n ← header
0xAB («) opens a statement
0xBB (») closes a statement
Heads-up: the file starts with a JPEG-like FF D8 FF DB, presumably so that drag-and-drop and file-type
registration behave; the rest is plain ASCII/latin-1.
Statement kinds
«component (x,y) rot 0 ← placement; rot 0 = vertical, rot 6 = 90°
«symbol <DESIGNATOR> ← the reference designator lives here
«type: R»
«line (0,-200) (0,-150) …» ← symbol graphics are EMBEDDED per instance
«text (50,0) 1 7 0 0x1000000 -1 -1 "R1"»
«text (-50,0) 1 7 0 0x1000000 -1 -1 "10K"»
«pin (0,200) (0,0) 1 64 0 0x0 -1 "2"»
»
»
«wire (0,200) (1000,200) "n1"»
«net (1000,600) 1 13 0 "GND"» ← net label (this is how "ground" is done)
«junction (600,200)»
«text (0,-900) 1 8 0 0x1000000 -1 -1 ".tran 0 40n 0 1p"»
Gotchas that cost us the most time
- A component needs two text primitives (designator + value). With only one, the netlister emits a
malformed device line such asRL+ garbage +1MEGand the simulation fails silently. - Any free text is copied verbatim into the netlist. An annotation like
(a) open loadbecomes a syntax
error; it must start with*. - Pin coordinates are instance-relative, and rotation 6 maps
(0,±200)→(∓200,0). If you get one
wire endpoint wrong, you get a floating node and no error — just a wrong netlist. .plotpanes are ordered bottom-up: the last.plotstatement is drawn at the top. One.plotper
pane works exactly as the help file says.QUX.exe -Exportsilently downsamples to ~1000 points if NPOINTS is omitted — a 100 ps edge disappears
and you chase ghosts for an hour.QUX -Export x.qraw "V(out)" 40000 CSVfixed it.
Headless pipeline that works
QSPICE64.exe circuit.cir → runs, writes .qraw
QUX.exe -Netlist circuit.qsch → schematic → netlist (great as a syntax check)
QUX.exe -Run circuit.qsch → opens GUI and runs
QUX.exe -Export circuit.qraw "V(a),V(b)" 40000 CSV → data out
The -Netlist round-trip is what made this project feasible: the AI could verify its own schematic by
checking that the netlist says T1 n1 0 out 0 Z0=50 Td=1n instead of eyeballing a PNG.
The five things that blocked us
- The
.qschformat is undocumented. We inferred everything above by comparing files that QSPICE itself
saved; nothing here came from inspecting the binaries. Is there any chance of a published spec (even a
minimal one), or a stability guarantee? Right now every QSPICE update is a regression risk for generated
schematics. - Built-in symbols are not available as files.
C:\Program Files\QSPICEships ~200.qsym, but
Builtin Symbols (Native Devices) — includingT-Lossless Transmission Line— are not among them; we could
find neither a.qsymnor a plain string for them inQUX.exe(likely a compiled resource).
Since.qschembeds graphics per instance, a generated file cannot reference the native
symbol by name; we have to draw our own (and it never looks exactly like yours).
Request: export the native symbols as.qsym, or allow a component to reference a built-in by name. - No netlist → schematic CLI.
Ctrl-Shift-V(“paste netlist as graphical symbols”) is GUI-only and we
couldn’t drive it reliably through automation. AQUX.exe -Schematic netlist.cir out.qschwould be a
game-changer for AI/tooling integration — and would also let us start from a simulator-verified netlist. - Silent failure mode. An invalid
.qschproduced a netlist containing only.end, with no diagnostic.
Any hint in the console (“component at (x,y) has no value text”) would have saved hours. - Pane labels.
.plot V(OUT_A)showsV(OUT_A), which is fine — but only because we forced net names
with«net …». Node auto-naming (N01,N02…) makes generated.plotdirectives brittle. A
«probe name="…" node="…"»or a.plot … ; titlesyntax would help.
Result (if anyone wants to reproduce it)
Five terminations of the same 50 Ω link (open / parallel / series / Thevenin / AC), one .qsch,
one Run, five auto-plotted panes:
.plot V(OUT_A) … .plot V(OUT_E)in the netlist- verified:
T1 … Z0=50 Td=1nuses the built-in lossless line - waveforms: open ≈ ringing to 1.5 V, parallel 0…0.667 V, series 0…1 V, Thevenin 0.167…0.833 V, AC ≈ 0…0.667 V
I’m happy to share the generator (≈200 lines of Python, standard library only) if Qorvo is comfortable with
this being done at all — it’s clearly unofficial and comes with no guarantees.
Questions to Qorvo
- Is programmatic
.qschgeneration something you’d support, or would you rather we stay in netlist land and
treat schematics as GUI-only? - Would extending PyQSPICE with a
netlist → schematicpath be considered?
Thanks — and thanks for a simulator that starts in 0.1 s and has a usable CLI at all; most of the above came
from the fact that we could drive it from a script.


