simple ngSPICE simulation headache

  • Thread starter pstrang_nospam@gmail_nosp
  • Start date
P

pstrang_nospam@gmail_nosp

Guest
Arrrggghhh....I'm at a loss as to the source of these errors. I get
them with the most basic circuit.
My tools: gEDA suite version from Jan 2006: gschem -> gnetlist ->
ngspice.

Here's my netlist:

=============================================================
* gnetlist -v -g spice-sdb ammeter.sch
*********************************************************
* Spice file generated by gnetlist *
* spice-sdb version 12.27.2005 by SDB -- *
* provides advanced spice netlisting capability. *
* Documentation at http://www.brorson.com/gEDA/SPICE/ *
*********************************************************
*============== Begin SPICE netlist of main design ============
V1 2 0 sin(12 1 1kHz)
Rload 1 0 1.2
Rshunt 2 1 .001
..END
=============================================================

I'm new to SPICE, and am just trying to simulate a sinusoidal signal
through a resister divider network. Easy right? Blaahhhh.

=============================================================
******
** ngspice-17 : Circuit level simulation program
** The U. C. Berkeley CAD Group
** Copyright 1985-1994, Regents of the University of California.
** Please submit bug-reports to: ngspice-bugs@lists.sourceforge.net
** Creation Date: Sat Feb 11 20:30:26 MST 2006
******

Circuit: * gnetlist -v -g spice-sdb ammeter.sch

ngspice 201 -> tran .00001 .002
Doing analysis at TEMP = 300.150000 and TNOM = 300.150000
Fatal error: tran: transmission line z0 must be given
doAnalyses: no such parameter on this device

tran simulation(s) aborted
================================================================

What the #@^%? I don't have ANY transmission lines! I've tried
numerous different sources. It actually worked once, but I can't
reproduce it. :( darn it!

Any help would be very much appreciated.
Thanks!
 
"pstrang_nospam@gmail_nospam.com" <pstrang@gmail.com> schrieb im Newsbeitrag
news:1139783781.292907.234230@z14g2000cwz.googlegroups.com...
Arrrggghhh....I'm at a loss as to the source of these errors. I get
them with the most basic circuit.
My tools: gEDA suite version from Jan 2006: gschem -> gnetlist -
ngspice.

Here's my netlist:

=============================================================
* gnetlist -v -g spice-sdb ammeter.sch
*********************************************************
* Spice file generated by gnetlist *
* spice-sdb version 12.27.2005 by SDB -- *
* provides advanced spice netlisting capability. *
* Documentation at http://www.brorson.com/gEDA/SPICE/ *
*********************************************************
*============== Begin SPICE netlist of main design ============
V1 2 0 sin(12 1 1kHz)
Rload 1 0 1.2
Rshunt 2 1 .001
.END
=============================================================

I'm new to SPICE, and am just trying to simulate a sinusoidal signal
through a resister divider network. Easy right? Blaahhhh.

=============================================================
******
** ngspice-17 : Circuit level simulation program
** The U. C. Berkeley CAD Group
** Copyright 1985-1994, Regents of the University of California.
** Please submit bug-reports to: ngspice-bugs@lists.sourceforge.net
** Creation Date: Sat Feb 11 20:30:26 MST 2006
******

Circuit: * gnetlist -v -g spice-sdb ammeter.sch

ngspice 201 -> tran .00001 .002
Doing analysis at TEMP = 300.150000 and TNOM = 300.150000
Fatal error: tran: transmission line z0 must be given
doAnalyses: no such parameter on this device

tran simulation(s) aborted
================================================================

What the #@^%? I don't have ANY transmission lines! I've tried
numerous different sources. It actually worked once, but I can't
reproduce it. :( darn it!

Any help would be very much appreciated.
Thanks!


Hello,

you forgot the '.' in front of "tran".

..tran ...

All SPICE commands start with '.'.

Txxx ... means indeed a transmission line.

Best regards,
Helmut
 
On 12 Feb 2006 14:36:21 -0800, "pstrang_nospam@gmail_nospam.com"
<pstrang@gmail.com> wrote:

Arrrggghhh....I'm at a loss as to the source of these errors. I get
them with the most basic circuit.
My tools: gEDA suite version from Jan 2006: gschem -> gnetlist -
ngspice.

Here's my netlist:

=============================================================
* gnetlist -v -g spice-sdb ammeter.sch
*********************************************************
* Spice file generated by gnetlist *
* spice-sdb version 12.27.2005 by SDB -- *
* provides advanced spice netlisting capability. *
* Documentation at http://www.brorson.com/gEDA/SPICE/ *
*********************************************************
*============== Begin SPICE netlist of main design ============
V1 2 0 sin(12 1 1kHz)
OFFSET ----^ ^----AMPLITUDE

Is that what you really want?

Rload 1 0 1.2
Rshunt 2 1 .001
.END
=============================================================

I'm new to SPICE, and am just trying to simulate a sinusoidal signal
through a resister divider network. Easy right? Blaahhhh.

=============================================================
******
** ngspice-17 : Circuit level simulation program
** The U. C. Berkeley CAD Group
** Copyright 1985-1994, Regents of the University of California.
** Please submit bug-reports to: ngspice-bugs@lists.sourceforge.net
** Creation Date: Sat Feb 11 20:30:26 MST 2006
******

Circuit: * gnetlist -v -g spice-sdb ammeter.sch

ngspice 201 -> tran .00001 .002
Doing analysis at TEMP = 300.150000 and TNOM = 300.150000
Fatal error: tran: transmission line z0 must be given
doAnalyses: no such parameter on this device

tran simulation(s) aborted
================================================================

What the #@^%? I don't have ANY transmission lines! I've tried
numerous different sources. It actually worked once, but I can't
reproduce it. :( darn it!

Any help would be very much appreciated.
Thanks!
Well? It is FREE after all ;-)

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

Freedom of the Press? We Have a New Definition of Yellow Journalism
 
Thanks guys. Yea, I'm simulating a small sinusoidal signal ontop of a
DC source (just playing around).

In ngspice, the commands don't start with a '.'. But yea, now I see
the source of the confusion. Hummm...still a mystery.
 
On 12 Feb 2006 14:52:13 -0800, "pstrang_nospam@gmail_nospam.com"
<pstrang@gmail.com> wrote:

Thanks guys. Yea, I'm simulating a small sinusoidal signal ontop of a
DC source (just playing around).

In ngspice, the commands don't start with a '.'.
Are you sure? Then how do you differentiate between a transient
COMMAND and a T-line?

But yea, now I see
the source of the confusion. Hummm...still a mystery.
Leave it to the Eunuchs crowd to obfuscate the simple...

From....

http://ngspice.sourceforge.net/octavespice.html

* simulation de RC2
..control
tran 10n 10000n
write
..endc

Looks like the analysis command has to be "wrapped" in a
..control/.endc statement.

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

Freedom of the Press? We Have a New Definition of Yellow Journalism
 
On 12 Feb 2006 15:18:04 -0800, "pstrang_nospam@gmail_nospam.com"
<pstrang@gmail.com> wrote:

Thank you!
You are quite welcome!

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

Freedom of the Press? We Have a New Definition of Yellow Journalism
 
Jim Thompson <To-Email-Use-The-Envelope-Icon@my-web-site.com> wrote:
: Looks like the analysis command has to be "wrapped" in a
: .control/.endc statement.

This should not be the case. Moreover, I tried running the OP's
circuit using my copy of ngspice. I had no problem entering the
tran command & getting good results without the dot (.tran) or without
using .control/.endc.

Note to Helumt: The OP was issuing tran at the command line. You
don't need the dot notation when the SPICE directive is issued at the
command line. YOu only need it when you embedd the command in the
SPICE netlist. Of course, you never touch the SPICE command line when
you use LTSpice, so you use the dot notation all the time. ;-)

Questions for the OP:

1. Did following Jim's suggestion (use .control/.endc) really work
for you?

2. If so, when you built ngspice, which configure flags did you set?
Can you please post (or e-mail me) the config.log file? Of particular
interest are the first half-dozen or so lines of the log file which
output what the configure parameters were. I'd like to see if because
I wonder if the control stuff (newly added) has some bugs in it.

Stuart
 
"Jim Thompson" <To-Email-Use-The-Envelope-Icon@My-Web-Site.com> a écrit dans
le message de news:r5fvu1dh7hjr90k056u7qgnhpe6tq1ucij@4ax.com...
On 12 Feb 2006 14:52:13 -0800, "pstrang_nospam@gmail_nospam.com"
pstrang@gmail.com> wrote:

Thanks guys. Yea, I'm simulating a small sinusoidal signal ontop of a
DC source (just playing around).

In ngspice, the commands don't start with a '.'.

Are you sure? Then how do you differentiate between a transient
COMMAND and a T-line?

But yea, now I see
the source of the confusion. Hummm...still a mystery.

Leave it to the Eunuchs crowd to obfuscate the simple...

From....

http://ngspice.sourceforge.net/octavespice.html

* simulation de RC2
.control
tran 10n 10000n
write
.endc

Looks like the analysis command has to be "wrapped" in a
.control/.endc statement.
Don't know ngspice, but the .control .endc is the XSPICE standard control
block that allow lots of nice scripting.
Inside the block, no dot prefixing.

You can still use dotted commands with no control block.

IOW, either write:

..control
tran 10n 10000n
write
.endc

or:
..tran 10n 10000n


--
Thanks,
Fred.
 

Welcome to EDABoard.com

Sponsor

Back
Top