[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Re: change from ngspice to gnucap




On Apr 20, 2006, at 9:36 AM, Markus Feldmann wrote:



Thanks for your Answer.

I think that it is an advantage from the GUI to setup a circuit but
thats my opinion.
I think i would be confused to not forget the many node Numbers, and
which is conected with whom.

Oh, certainly draw your schematics with gschem! The question is what to do with them.


One extremely handy way to automate the the flow from schematics to simulations is to use "make". A makefile might look like this:

# Choose your favorite SPICE
SPICE=ngspice

simulation : main.cir
	$(SPICE) main.cir

# netlist a subcircuit
sub.cir : sub.sch
	gnetlist -g spice-sdb -o sub.cir sub.sch

# netlist main circuit (assume sub.cir is used via .include)
main.cir : sub.cir main.sch
	gnetlist -g spice-sdb -o main.cir main.sch

Put that in a file named Makefile. Be sure that the indented lines start with "tab" characters. Then type "make simulation". It'll run gnetlist twice to make SPICE netlists, then run ngspice, dropping you into the ngspice command interpreter. You can automate very elaborate simulations of very complicated circuits in this manner. Type "info make" for more on makefiles.

John Doty              Noqsi Aerospace, Ltd.
jpd@xxxxxxxxxxxxx