diff options
author | rahulp13 | 2020-03-03 05:31:58 +0530 |
---|---|---|
committer | rahulp13 | 2020-03-03 05:31:58 +0530 |
commit | dfc268e0863c913a1b8726cd54eea3b40caf7c67 (patch) | |
tree | 1cd82634684da5ae86b558d44756189e080545d4 /Windows/spice/how-to-use-ngspice140111.txt | |
parent | fd62c52150c7d1f81da8060b2f5db6b94d174ccf (diff) | |
download | eSim-dfc268e0863c913a1b8726cd54eea3b40caf7c67.tar.gz eSim-dfc268e0863c913a1b8726cd54eea3b40caf7c67.tar.bz2 eSim-dfc268e0863c913a1b8726cd54eea3b40caf7c67.zip |
upgrade ngspice to v31
Diffstat (limited to 'Windows/spice/how-to-use-ngspice140111.txt')
-rw-r--r-- | Windows/spice/how-to-use-ngspice140111.txt | 359 |
1 files changed, 0 insertions, 359 deletions
diff --git a/Windows/spice/how-to-use-ngspice140111.txt b/Windows/spice/how-to-use-ngspice140111.txt deleted file mode 100644 index b84e9684..00000000 --- a/Windows/spice/how-to-use-ngspice140111.txt +++ /dev/null @@ -1,359 +0,0 @@ - H. Vogt, Jan 12th, 2014 - -ngspice-26 has been compiled from the ngspice-26 tarball, Jan 11th, 2014. - -ngspice.exe was generated by MS Visual Studio 2008, configuration -ReleaseOMP, using full optimization (compiler flags /O2 /Oi /Ot /GL, linker flag /ltcg). - -vcomp90.dll is the microsoft runtime distributable for OpenMP -(see C:\Program Files (x86)\Microsoft Visual Studio 9.0\1031\redist.txt). - -The XSPICE code models *.cm were generated with -TDM mingw gcc 4.8.1 and MSYS 1.0.10 using the following configuration: - -./configure --with-windows --enable-xspice --enable-cider --disable-debug - -gcc is invoked with the -O2 compiler flag, which is set in configure.ac. - -This version of ngspice 26 thus does not contain the adms or ndev extensions. - -Expand the ngspice-26-140112.zip file directly into C: so that you will get C:\Spice\bin etc. -For other places for ngspice installation, see below. - -The following examples are tested under Windows XP professional and Windows 7 64 Bit. - -Directory /examples offers some example input files for special commands. - - -*** How to use ngspice with examples provided in directory /tests *** - -********************************************************************* -Starting ngspice from MS Explorer window (interactive mode): - -Double click on ngspice.exe in C:\Spice\bin - -*** ngspice window: - -cd c:\spice\tests\bsim4 - -source comprt.cir - -run - -display - -plot v(1) v(2) v(3) v(8) v(9) - -write comprt2.raw - -quit -********************************************************************* - -********************************************************************* -* Starting ngspice within the msys window, interactive mode: - -* Open an MSYS window. - -*** msys window: - -export PATH=$PATH:/c/Spice/bin - -cd /c/Spice/tests/bsim4 - -ngspice comprt.cir - -*** ngspice window: - -run -display -plot all - -*** write data into raw file to actual directory /c/Spice/tests/bsim4: - -write comprt.raw - -quit - -If you want to use interactive mode with a circuit file in a different -directory (e.g. C:\test\comprt.cir) , you have to call ngspice like this: - -ngspice C:\\test\\comprt.cir -or -ngspice C:\\test/comprt.cir - -MSYS 1.0.10 is specific about file and directory names! - -You cannot start ngspice from C:\ or D:\ directly if you don't -have administrator rights. You may choose a subdirectory instead. - -********************************************************************* - -********************************************************************* -* Starting ngspice within the msys window, batch mode: - -* Open an MSYS window. - -*** msys window: - -export PATH=$PATH:/c/Spice/bin - -cd /c/Spice/tests/bsim4 - -ngspice -b -r comprt3.raw -o comprt3.out comprt.cir - -* Plotting - -*** msys window: - -ngspice -load comprt3.raw -plot v(1) v(2) v(3) v(8) v(9) -quit - -* The data in the raw file comprt3.raw are stored in a compact binary -* format. If you want them to be ASCII, you have to uncomment line -set filetype=ascii -* in C:\Spice\share\ngspice\scripts\spinit (remove the '*'). -********************************************************************* - -********************************************************************* -* Starting ngspice within the dos window (cmd.exe) , interactive mode: -* (also an example for using xspice extension) - -* Open a DOS window. - -*** DOS window: - -set PATH=%PATH%;C:\Spice\bin - -cd C:\Spice\examples\transimpedanceamp - -ngspice output.net - -*** ngspice window: - -run -display -* end display with 'q' -plot vout2 - -* write all data into raw file to actual directory C:\Spice\tests\transimpedanceamp: -write timp.raw -* write only input and output -write timp2.raw v3#branch vout2 -quit - -Calling a source file in a different directory is done by: - -ngspice D:\testinput\output.net - -********************************************************************* -********************************************************************* -* Use ngnutmeg for plotting within the dos window (cmd.exe), using the -raw file timp.raw created above: - -* Open a DOS window. - -*** DOS window: - -set PATH=%PATH%;C:\Spice\bin - -cd C:\Spice\examples\transimpedanceamp - -ngspice - -*** ngspice window: -load timp.raw -plot vout2 -plot i(v3) - -quit -********************************************************************* - -********************************************************************* -* Starting ngspice within the dos window (cmd.exe) , batch mode, using -* .plot and/or .print commands in the input file (printer plot output), -* no raw file, similar to SPICE2G6: - -* Open a DOS window. - -*** DOS window: - -set PATH=%PATH%;C:\Spice\bin - -cd C:\Spice\examples\ - -ngspice -b -o cs.out cs_mixtv4.inp - -* The ouput will be plotted and printed to C:\Spice\examples\cs.out. - -* If you enter -ngspice -b -r cs.raw -o cs.out cs_mixtv4.inp -* instead, you will get a raw file (simulator output data), -* .print and .plot will be ignored. -* You may plot the data by using ngnutmeg (see example above). - -********************************************************************* -********************************************************************* -* A numparam example with convergence and ringing problems -(Xiaoqun Wu e.a.: "Bifurcation Behavior of SPICE Simulations of Switching Converters: A Systematic -Analysis of Erroneous Results", IEEE TRANSACTIONS ON POWER ELECTRONICS, VOL. 22, NO. 5, SEPTEMBER 2007, p.1743 - -dos window (cmd.exe) , interactive mode: - -* Open a DOS window. - -*** DOS window: - -set PATH=%PATH%;C:\Spice\bin - -cd C:\Spice\examples\numparam - -ngspice power.cir - -*** ngspice window: - -run -plot vc#branch - -*** compare to literature by selecting appropriate plot windows using right mouse tab - -* write all data into raw file to actual directory C:\Spice\examples\numparam: -write power-all.raw -* write only relevant output -write power.raw vc#branch -quit - -********************************************************************* -********************************************************************* -* Running ngspice from a different directory (for example D:\tmp) -* Starting ngspice within the dos window (cmd.exe) , interactive mode: - -* Extract ngspice.zip to D:\tmp - -* Edit spinit (found in D:\tmp\Spice\share\ngspice\scripts) to have the correct - path for the XSPICE codemodels: - Line - codemodel C:/Spice/lib/spice/spice2poly.cm - has to be replaced by - codemodel D:/temp/Spice/lib/spice/spice2poly.cm - the other codemodels lines have to be changed respectively. - -* Open a DOS window. - -*** DOS window: - -set SPICE_LIB_DIR=D:\tmp\Spice\share\ngspice -set PATH=%PATH%;D:\tmp\Spice\bin -cd D:\tmp\Spice\examples\transimpedanceamp -D: - -ngspice output.net - -*** ngspice window: - -run -plot vout2 - -* write all data into raw file to actual directory D:\tmp\Spice\tests\transimpedanceamp: -write timp.raw -* write only input and output -write timp2.raw v3#branch vout2 -quit - -********************************************************************* -********************************************************************* -* Running ngspice from a different directory (for example D:\tmp) -* Starting ngspice within the dos window (cmd.exe) , interactive mode - or starting with double click on ngspice in MS explorer: - -* Extract ngspice.zip to D:\tmp -* under Windows XP you may put the following lines into C:\autoexec.bat: - -set SPICE_LIB_DIR=D:\tmp\Spice\share\ngspice -set PATH=%PATH%;D:\tmp\Spice\bin - -* Edit spinit (found in D:\tmp\share\ngspice\scripts) to have the correct - path for the XSPICE codemodels: - Line - codemodel C:/Spice/lib/spice/spice2poly.cm - has to be replaced by - codemodel D:/temp/Spice/lib/spice/spice2poly.cm - the other codemodels lines have to be changed respectively. - -* You may then start immediately after opening the command window (cmd.exe) - with: - -cd D:\tmp\Spice\examples\transimpedanceamp -D: - -ngspice output.net - -*** ngspice window: - -run -plot vout2 - -* write all data into raw file to actual directory D:\tmp\Spice\tests\transimpedanceamp: -write timp.raw -* write only input and output -write timp2.raw v3#branch vout2 -quit - -********************************************************************* - -********************************************************************* -********************************************************************* -* spinit - -* spinit is used to set options or to set varioables. spinit is read into ngspice - before any input file. The codemeodel path for xspice may be set as well. - - There is a search sequence for spinit. - 1) If the invironmental variable is SPICE_LIB_DIR is set to a path, e.g. to - SPICE_LIB_DIR=D:\tmp\Spice\share\ngspice, then spinit is searched for - in D:\tmp\Spice\share\ngspice\scripts. If not set then we look for it in - C:\Spice\share\ngspice\scripts. If this path is not available or spinit is - not there, then ngspice searches for spinit in the path where ngspice.exe - resides. If not found there, a warning note is issued. - -* .spiceinit - -* .spiceinit is read directly after the spinit file. You may keep spinit as is, - and put any personal preset variables or scripts into .spiceinit. Data in - .spiceinit will override data from spinit. - ngspice will search for .spiceinit either in your home directory or in the - directory where ngspice.exe is located. - -********************************************************************* -********************************************************************* -* Universial, simple install - - Put ngspice.exe and spinit into a subdirectory myspice\bin - Put the codemodels (e.g. analog.cm) into a subdirectoty myspice\codemodels. - Edit spinit and change the codemodel lines to - - codemodel ../codemodels/spice2poly.cm - - etc. - - Instead of 'myspice' you may now choose any directory for your installation - of \bin and \codemodels, even C:\ will work. - - -********************************************************************* -********************************************************************* -* miscellaneous - -Documentation specific to ngspice is available at -http://ngspice.sourceforge.net/docs.html. - -For additional info I recommend the Spice3 user manual at: -http://newton.ex.ac.uk/teaching/CDHW/Electronics2/userguide/index.html#toc - -For some information on CIDER see -http://embedded.eecs.berkeley.edu/pubs/downloads/cider/index.htm -A manual however is missing on this web site. - -For an xspice manual see -http://users.ece.gatech.edu/~mrichard/Xspice/ |