Hints & Tips: October 1995

Q: How can I simulate very large circuits with SmartSpice?


A: SmartSpice is capable of simulating very large circuits. Such simulations can consume a large amount of CPU time, memory and disk space. There are a number of options available in SmartSpice that can be used to increase the speed of simulation and decrease memory and disk space usage. These options can be divided into those affecting output, rawfiles and simulation. If it is anticipated that a large amount of data will be generated or that the simulation will take a long time, it is recommended that SmartSpice be used in batch mode:

% smartspice -b infile -o outfile -r rawfile

This will result in the optimal use of memory and available resources.

OUTPUT Options

The following options affect the output generated by SmartSpice and normally stored in a file.


The output file will contain messages printed during simulation and the results of certain output statements, e.g. .print, .plot, .measure. The brief option prevents the input file from being copied to the output file. The nomod option suppresses listing of model parameters and temperature dependent variables. The large option reduces the amount of memory used by SmartSpice to store some parsing information and prints messages to the screen informing the user of the current status of the simulation. The nopage option suppresses automatic paging and banners for each major section of the output. The format option is used by the .measure statement to generate more compact output of results. The numdgt option sets the number of digits printed by .print and .measure type statements.


.OPTIONS brief nomod nopage large

RAWFILE Options and Statements

The following options affect rawfile generation


By default a rawfile will not be generated during simulation. It will only be generated if the -r command line option is used or the post option is present in the input deck. If -r rawfile is used, then the format of the rawfile is set by the rawfiletype variable. The default value of rawfiletype is ascii. The most frequently used rawfile types are:

Rawfile Type
Post Option
  (Double precision )
      (Single precision )

binary_xdr and binary_float_xdr are platform independent (XDR) versions of the binary and binary_float rawfile types, respectively.

The rawfiletype variable can be set in the .SmartSpice.ini file in the userÕs home directory. The most compact rawfile types are binary_float and binary_float_xdr. The ascii rawfile type results in the largest rawfiles.

The post option can also be used to automatically generate rawfiles. The type of the rawfile generated is set by the value assigned to the post option. The table shown above contains a list of post option values and the corresponding rawfile types. If the post option is provided without a value, then a value of 1 is assumed.

The probe option is used to limit the vectors that are saved. It is only active when used in conjunction with the post option. If the probe option is not used, then all node voltages, independent currents and vectors created by the .let statement will be saved. If the probe option is used, then the only vectors saved will be those mentioned in output statements.

The rawpts option is used to incrementally save the rawfile. By default SmartSpice will store all necessary information in memory until the end of the simulation and then store the rawfile. In the case of a large or long simulation, this can result is a very large amount of memory being used. By using the rawpts option, data will be dumped to the rawfile every rawpts timepoints. The memory that is used to store data is constant and does not need to be dynamically allocated. The rawfile is always is a stable state, and can be loaded into the SmartSpice post-processor for analysis during simulation.

The limpts option limits the maximum number of timepoints during transient analysis. Once the number of timepoints exceeds limpts, the simulation will terminate.

The interp option will force SmartSpice to save results at every tenth data point during transient analysis. This is equivalent to using store=10 on the .tran statement line. The following .tran statement will save every second data point during transient analysis.

.TRAN 1n 10m STORE=2

SmartSpice will save all vectors mentioned in output statements in the rawfile. If the .probe statement is used with no arguments, then all node voltages, independent currents and device terminal currents will be saved. Saving the terminal currents can generate a very large amount of data, since each MOS or BJT device will save 4 currents. Hence, for example if a circuit has 10,000 transistors, then 40,000 terminal currents will be saved. If there are 10,000 timepoints and the rawfile is saved as a single precision binary file then the terminal currents will contribute at least (40,000*10,000*4bytes =) 1.6Gbytes of data to the rawfile.


.OPTIONS post=3 probe rawpts=500

Do not use .PROBE, use .SAVE instead and only save the vectors that you are interested in.

Simulation Options


The most important option that affects simulation speed in the vzero option. This option affects the algorithms used during simulation and can lead to substantial speed-ups especially for large circuits. By default vzero is 0 and SmartSpice uses standard Berkeley Spice3-like simulation algorithms. If vzero is set to 2, then a modified MNA formulation of the circuit equations is used. The vzero option is supported by the .tran, .dc and .op analyses statements and is supported by the following set of models;

- BJT (Level, 1 and 2)

- Diode (Level 1 and 3)

- MOSFET (Level 1,2 and 3, BSIM1, BSIM3v2 and BSIM3v3)

- Linear devices : R, C, L, E, F, G, H

- Independent current and voltage sources.

The autostop option can be used to halt simulation once all measurements specified in the input deck have been successfully executed. This can be especially important if the user is not sure of the length of simulation time that will be required to perform the measurements.


.OPTIONS vzero=2

Q: How can I select the Postscript plot option in UTMOST?

A: The latest version of UTMOST allows the user to output captured postscript files to a printer or to a postscript file. The user is provided with a hardware selection screen under the plotter column. Use the "Plot to:" option to select the file or printer option. The printer path and/or printer name is specified on the File Management Screen.

Q: Can I select the Linear or Log Scaling independently for each curve in ALL_DC routines?

A: Yes. In UTMOST version 12.3.5, the "Multiple Selection" feature is added to the routine control screen for ALL_DC routines.(Figure 1.)

The user can open the "Multiple Routine Screen" by pressing the "Multiple Select" button located in the Routine Control screen. The buttons in the "Multiple Routine Screen" for ID/VD, ID/VG, gds and gm can be toggled between "Linear" and "Log" scales.

After the proper scales are selected, the "Measure" or "Execute" button should be pressed to activate the new scale settings.

Q. I have too many devices selected in my data log file. I like to generate a sub log file for critical devices I use for modeling. How can I generate this new log file?

A: This feature is available in UTMOST version 12.3.5. Follow the given steps to create a new log file for BSIM3 or ALL_DC routines:

  • Load the original log file
  • Open the setup and results screen and select BSIM3 or ALL_DC routine
  • Open the strategy screen and deselect all devices
  • Select the devices which should go into the new log file
  • Open the output log file screen and enter the new log file name. Press the Òopen newÓ button
  • Press the ÒmeasureÓ button in the extraction screen for BSIM3 or ALL_DC routine
  • The data for selected devices should appear in the graphics screen
  • After the last device data is retrieved close the new log file

Figure 1. Multiple Routine Screen.