HINTS & TIPS

Q: How can SmartSpice be customized?

A: When SmartSpice is invoked, a number of configuration files are opened. Global configuration files are stored in the SmartSpice installation area and can be used to set site-wide options. Local configuration files are stored in each users home directory and can be used to set individual user preferences.

There are two types of configuration file available. The init file has the file extension ".ini" and is used to set internal variables/options within SmartSpice. The resource file has the extension ".res" and is used to setup X-Windows resources, i.e. colors, fonts, graphics options, etc.

When SmartSpice is invoked, it first reads the global init file SmartSpice.ini in the directory $SILVACO/lib/smartspice/$RELEASE/common, where $SILVACO is the installation area and $RELEASE is the SmartSpices version number of. After this it will read the users local init file stored in the users home directory. This file is hidden and has the file name .SmartSpice.ini. This sequence allows the users local preferences to override any global settings. An example init file is as follows;

 

	Mandatory Title line
	.CONTROL 
	set syntax_form = 1
	set numdgt = 12
	set savemeasures = true 
	set rawfiletype = binary_float 
	define sum(a,b) a+b
	.ENDC 
	

SmartSpice reads the resource files in exactly the same sequence as the init files. The global resources file SmartSpice.res is located in the same directory as the global init file. The local resources file .SmartSpice.res is stored in the users home directory. The resource files are only parsed when SmartSpice is started in window mode, or when plots/windows are created in batch/command mode.

 


Q: I have a netlist generated for the PSPICE(tm) circuit simulator, how can I simulate this using SmartSpice?

A: The variable syntax_form is used by SmartSpice to control the format of the input deck. By default syntax_form has a value of 0. SmartSpice will then parse a standard Berkeley SPICE input deck or HSPICE(tm) input deck. Unfortunately the PSPICE(tm) netlist format is slightly different to these formats. If syntax_form is set to 1, then SmartSpice will parse a PSPICE(tm) input deck.

 


Q: How do I save measurements in a rawfile ?

A: By default SmartSpice will not save the results of measurements into the rawfile. The option save measures can be used to force SmartSpice to save these results. This option can be specified on the .OPTIONS line in an input deck, or it can be activated using the set command, as in the example init file shown previously.


Q: How can I save results in a rawfile without using the -r rawfile command line switch, in batch mode?

A: Two new options, post and probe were introduced into SmartSpice 1.3.6. The "post" option forces SmartSpice to automatically generate a rawfile. The name of the rawfile is generated from the name of the current input deck by replacing its extension with the ".raw" extension. The post option can have a number of values, e.g. 1 (default) will generate a binary rawfile, 2 will generate an ASCII rawfile and 3 will generate a single precision binary rawfile.

The "probe" option is used to limit the number of output variables saved in a rawfile, using the "post" option, to those variables specified in any output statement in the input decks. If the "probe" option is omitted, then all node voltages and independent currents will be saved in addition to any variables appearing in the output statements.


Q: How do I incrementally save results during simulation?

A: By default SmartSpice will save all results in operating memory until the end of simulation and then generate a rawfile. In the case of a large or time-consuming simulation, it is useful to save the results to the rawfile during simulation. The option rawpts is used to do this. If rawpts = num is specified on the .options statement in the input deck, then SmartSpice will initially allocate enough memory to store num points of each variable. During simulation, SmartSpice will append the currently stored set of data to the end of the rawfile after every num points. the rawfile can be viewed at any time during simulation.


Q: How do I reduce the size of rawfile generated by SmartSpice?

A: A. By default SmartSpice will store rawfiles in an ASCII format. This will typically consume quite a large amount of disk space if a lot of variables are stored, or the variables contain many points. To reduce the size of the rawfile, it is more efficient to use a binary format. There are 4 binary formats available. The format of the rawfile can be set by the SmartSpice variable rawfiletype, or by the "post" option. Acceptable values for rawfiletype, and "post" are as follows,

rawfiletype post description
ASCII 2 ASCII
binary 1 Double precision binary.
binary_float 3 Single precision binary.
binary_xdr 4 Platform independent double precision.
binary_float_xdr 5 Platform independent single precision.

The single precision formats are approximately 50% smaller than their double precision counterparts. The platform independent formats can be used to generate and view binary rawfiles on different platforms.

Q: How do I reduce the number of points stored in a rawfile during transient analysis?

A: By default SmartSpice will store all accepted timepoints in the rawfile. The time step between accepted timepoints will be selected by SmartSpice to satisfy accuracy requirements.

The .tran statement option store = n can be used to reduce the number of timepoints stored. If this option is used, then SmartSpice will store data at each nth timepoint.

If the interp flag is set in the .options statement, then data is stored at every 10th timepoint, i.e. this is the equivalent of using store = 10 on the .tran line.


Q: My input deck contains a number of .ALTER segments, how do I simulate all segments automatically in interactive mode?

A: If SmartSpice is invoked in interactive mode (i.e. either window or command mode) then the parsing and simulation phases of an input deck are separate. As a result, if a deck contains multiple .ALTER segments SmartSpice will create a separate deck for each segment. When the user attempts to run the simulation, SmartSpice will only run the simulation for the last circuit.

The user can simulate another segment by selecting the segment from the Decks..Input Decks menu, but if there are many segments in the deck, this can become tedious.

To automatically simulate all .ALTER portions in interactive mode, add the following .CONTROL block to the first segment of the input deck.

	.CONTROL 
	run
	.ENDC 
	

The commands in this block (in the case only one, run) will be executed for each segment after it is parsed.

Note : This only affects interactive mode, since in batch mode, SmartSpice will run the simulation for each segment once it is parsed.

Q: How do I change the default colors using by SmartSpice for plots?

A: The colors used by SmartSpice for plots can be changed using X resources. When SmartSpice is started, it allocated space for 32 colors. Color 1 is used as the default background color for charts, legends, etc, while color 32 is used as the default foreground color. The colors from 2-31 are used for plotting signals. The first signal is plotted in color 2, the second in color 3 and so on. The colors can be changed from their default values in one of the resource files, e.g to change the color of the first signal to red and the second signal to blue add the following lines.

	SmartSpice*GrNcolorColor2:   red  
	SmartSpice*GrNcolorColor3:   blue
	

Q: How do I change the logo printed out on plots from SmartSpice?

A: By default SmartSpice prints a logo "Silvaco International" on every plot. This logo can be changed using the X resource "GrNlogoMessage". For example, to change the logo to "Company ABC", add the following line to one of the resource files.

	SmartSpice*GrNlogoMessage : Company ABC