|
From: Mark G. <bit...@gm...> - 2006-12-21 18:11:05
|
Thank you very much, quite helpful. I read the manual, but I must need to start reading things closer, I completely missed that. Thank you. -mdg On 12/21/06, Aldo Romani <ar...@de...> wrote: > > Mark Goldman wrote: > > Is there a way to convince ngspice to > output something along the latter format? It seems like it would be > helpful for me as I explore spice and simple circuits. > If you look at the Spice3 manual, in chatper 5 you can read: > "Note that the raw output file is different from the data that Spice2 > writes to the standard output, which may also be produced by Spice3 with the > "-b" command line option." > Is that what you're looking for? See the examples below. > > > > > ---- output of commands I tried --- > $ cat example.cir > Example netlist > v1 1 0 dc 15 > r1 1 0 2.2k > r2 1 2 3.3k > r3 2 0 150 > .end > $ ngspice < example.cir > > Circuit: Example netlist > > Note: No ".plot", ".print", or ".fourier" lines; no simulations run > > That's correct. You didn't specify any simulation to be performed. > Try executing: > ngspice example.cir > > Then, after it loaded the netlist, you're presented the ngspice interactive > prompt. Here you can enter the interactive commands. > Try: > op > print all (or print v(1) v(2)) > > This tells ngspice to compute the operating point. > "Print all" outputs all the results of simulations (normally vectors) > You'll find other interactive commands here in section 5 > http://newton.ex.ac.uk/teaching/CDHW/Electronics2/userguide/index.html#toc > > Otherwise, if you need the good ol' spice2 you should: > 1) add simulation commands in your file. > e.g.: > Example netlist > v1 1 0 dc 15 > r1 1 0 2.2k > r2 1 2 3.3k > r3 2 0 150 > > .op > > .end > > 2) then you may safely run > ngspice -b example.cir > > > Hope this helps, > Aldo > > > > > $ spice < example.cir > 1*******12/20/06 ******** spice 2g.6 3/15/83 ********18:12:21***** > 0example netlist > 0**** input listing temperature = 27.000 deg c > 0*********************************************************************** > v1 1 0 dc 15 > r1 1 0 2.2k > r2 1 2 3.3k > r3 2 0 150 > .end > 1****************12/20/06 ************************ spice 2g.6 3/15/83 ****** > ******************18:12:21**************** > 0example netlist > 0**** small signal bias solution > temperature = 27.000 deg c > 0******************************************************************************* > ****************************************** > > node voltage node voltage > > ( 1) 15.0000 ( 2) 0.6522 > > voltage source currents > > name current > > v1 -1.117E-02 > > total power dissipation 1.67E-01 watts > 0 > job concluded > 0 total job time 0.00 > > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > Ngspice-users mailing list > Ngs...@li... > https://lists.sourceforge.net/lists/listinfo/ngspice-users > > > -- Our problems are mostly behind us, now all we have to do is fight the solutions. |