I am simulating a circuit with Gnucap, and I'm automating several steps in a Makefile:
all:
gnetlist power_switch_replacement.sch -s -g spice-sdb -o power_switch_replacement.net
gnucap -i power_switch_replacement.gnucap
I've created power_switch_replacement.sch
with Gschem. The Makefile generates a net from that and opens it interactively in Gnucap, after running the commands in power_switch_replacement.gnucap
:
get power_switch_replacement.net
model BC548 NPN
Vsupply +9v 0 9
list
Unfortunately this doesn't work. The get
, model
and list
commands run correctly but the Vsupply
command fails:
Vsupply +9v 0 9
^ ? what's this?
If I run the command manually (admittedly after a build
directive) it works:
gnucap> build
>Vsupply +9v 0 9
>
gnucap> list
<snip>
C1 ( 1 2 ) 100.u
Q1 ( 1 4 0 ) BC548 NA( 1.)
Q2 ( 3 2 0 ) BC548 NA( 1.)
R1 ( +9v 1 ) 1.K
R2 ( +9v 2 ) 1.K
R3 ( +9v 3 ) 2.2K
R4 ( 4 3 ) 2.2K
.model BC548 npn ( <snip> )
Vsupply ( +9v 0 ) DC 9.
Again I suspect I'm missing something fundamental about the way Gnucap works. Any help would be greatly appreciated.