simple ngSPICE simulation headache

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
    formatting link
    *
********************************************************* *============== 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: snipped-for-privacy@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!

Reply to
pstrang
Loading thread data ...

"pstrang_nospam@gmail_nospam.com" schrieb im Newsbeitrag news: snipped-for-privacy@z14g2000cwz.googlegroups.com...

Hello,

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

.tran ...

All SPICE commands start with '.'.

Txxx ... means indeed a transmission line.

Best regards, Helmut

Reply to
Helmut Sennewald

OFFSET ----^ ^----AMPLITUDE

Is that what you really want?

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
Reply to
Jim Thompson

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.

Reply to
pstrang

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

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

From....

formatting link

  • 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
Reply to
Jim Thompson

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 | |

formatting link
| 1962 | Freedom of the Press? We Have a New Definition of Yellow Journalism

Reply to
Jim Thompson

Jim Thompson 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?

  1. 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

Reply to
Stuart Brorson

"Jim Thompson" a écrit dans le message de news: snipped-for-privacy@4ax.com...

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.
Reply to
Fred Bartoli

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.