spice help

Thread Starter

haditya

Joined Jan 19, 2004
220
hi
i m jus learnin spice and i used the aac spice tutorial under references for the same.
under quirks the author mentions that the .end card must not be followed by any other character or anything..not even a return
however doing so gives me the .end card missing error in stark contradiction to wat is mentioned on the tutorial
inserting a character ..linefeed after the .end card causes the programme to work
alternatively using .op card after .end also gives proper results.

wat is goin wrong here? i m using spice 2g6 dos version runnin on winxp os.. i type my .cir files in notepad

also can somone recommend a online source for subcircuits in spice

thank you
aditya
 

Papabravo

Joined Feb 24, 2006
13,539
Originally posted by haditya@Apr 26 2006, 01:35 PM
hi
i m jus learnin spice and i used the aac spice tutorial under references for the same.
under quirks the author mentions that the .end card must not be followed by any other character or anything..not even a return
however doing so gives me the .end card missing error in stark contradiction to wat is mentioned on the tutorial
inserting a character ..linefeed after the .end card causes the programme to work
alternatively using .op card after .end also gives proper results.

wat is goin wrong here? i m using spice 2g6 dos version runnin on winxp os.. i type my .cir files in notepad

also can somone recommend a online source for subcircuits in spice

thank you
aditya
[post=16573]Quoted post[/post]​
I'm not sure what is going on with the program you are working with. I can suggest and recommend the free SPICE program from Linear Technology called LTSpice or SwitcherCADIII. It has a nice schematic entry interface, an active support group on Yahoo, and not much in the way of quirky behavior that cannot be explained or fixed with extreme rapidity.

Try it -- you'' like it!

As an added bonus you get one-button SMPS designs from a set of voltage and current requirements. The downside -- it only uses LT SMPS parts.
 

n9352527

Joined Oct 14, 2005
1,198
I've never used the 2g6 under DOS before, but I would think that the quirk mentioned was probably for 2g6 running under some flavour of UNIX. UNIX version is more particular about linefeed, CR and such things. The tutorial does mention that the quirks might not applicable for different versions or different SPICEs. I've used other flavour of SPICE where some of the quirks mentioned were present, such as first line must be a title, node 0 must be present and no open circuit (floating node) allowed but no other.

Generally, after the .end command, no other line is allowed (but the flavour that I use regularly does allow any number of empty lines). I found that your problem, where it didn't work if nothing was inserted after the .end and worked if there was something after the .end is very peculiar. Could you post both of your netlists (the one that gave an error and the good one)?

You might want to check the eCircuitCenter site for excellent SPICE tutorials, circuit collections and much much more. You could also download the HSPICE manual here. It has complete references, commands, elements, device models and equations. Some of the elements, commands and models are HSPICE proprietary, but most of them are applicable to other varieties of SPICE.
 

Thread Starter

haditya

Joined Jan 19, 2004
220
thanks for the links.. been to ecircuitcentre before.. yup its got quite a lot on spice..
heres the netlist with .op added after .end
Rich (BB code):
inverting opamp
v1 1 0 sin (0 1 1000 0 0)
r1 1 2 5k
r2 3 2 10k
rin 2 4 2meg
rbogus 4 0 1m
rout 5 3 75
eog 5 0 4 2 200000
.tran 0.01m 2m
.plot tran v(1,0) v(3,0) 
.end
.op
with no return after .end
Rich (BB code):
inverting opamp
v1 1 0 sin (0 1 1000 0 0)
r1 1 2 5k
r2 3 2 10k
rin 2 4 2meg
rbogus 4 0 1m
rout 5 3 75
eog 5 0 4 2 200000
.tran 0.01m 2m
.plot tran v(1,0) v(3,0) 
.end
and with linefeed after .end
Rich (BB code):
inverting opamp
v1 1 0 sin (0 1 1000 0 0)
r1 1 2 5k
r2 3 2 10k
rin 2 4 2meg
rbogus 4 0 1m
rout 5 3 75
eog 5 0 4 2 200000
.tran 0.01m 2m
.plot tran v(1,0) v(3,0) 
.end
 

n9352527

Joined Oct 14, 2005
1,198
The only thing that might cause problems, as far as I can see, are the first empty lines on both the error netlists. 2g6 thinks that the title (always first line) as empty and try to interpret the real title (2nd line) as a card. I think 2g6 ignores any lines after the .end, so that might not in itself flags an error.

What was the error according to the 2g6 output? It might be easier to diagnose the problem if you could redirect the output to a text file and attach it here.
 
Top