Distributing Spice Simulations

Summary
This application note shows the use of EnFuzion with SPICE, a popular program for simulation of VLSI circuits. EnFuzion supports the execution of a single program with multiple input parameters. VLSI circuit simulation is ideally suited for EnFuzion since such testing involves multiple simulations under different conditions. EnFuzion saves time and simplifies the execution:

  • It speeds up computation by distributing the computational load over a network of workstations;

  • It manages your computations by providing an easy to use graphical interface for generating the input parameters and for controlling the computation.

What is Spice?
Spice is a VLSI circuit simulation program. The Laboratory for Microelectronic System Design (at Faculty of Electrical Engineering, Ljubljana, Slovenia) is using EnFuzion to distribute Spice simulations over several HP and Sun workstations. This application note presents an example of how EnFuzion is being used by the laboratory to speed up circuit simulations. Special thanks go to Dr. Drago Strle and Dr. Andrej Vodopivec for assistance in preparing this case study.

Spice was used to perform AC analysis of a fully differential CMOS operational amplifier. The analysis calculates power supply rejection ratios as a function of frequency under different conditions. Different values of supply voltages, capacitive loads, temperature and process parameters are supplied as inputs. The following image is an excerpt from a layout of a second order modulator with a fully differential operational amplifier.

 

 

How did using EnFuzion help distribute Spice simulations?
Because EnFuzion handles the execution of a large number of jobs over multiple computers, it simplifies and accelerates computational experiments run with Spice. The total execution time depends on the complexity of the simulated circuit and on the power of machines in EnFuzion configuration. For example, if a single job takes an average of ten minutes, then the computation described in this application, with 192 different scenarios would take 32 hours to complete on one computer. In comparison, the computation could be done in only two hours using EnFuzion and sixteen computers.

How was EnFuzion used?
EnFuzion was easy to use with Spice:

  • Two files were needed: a template file for Spice and a plan file for EnFuzion
  • Input parameters were specified using the Preparator
  • File copying and execution were managed by Dispatcher, without additional user intervention on each remote machine
  • Execution commands were set up using an intuitive user interface

Specifying input parameters
Input parameters are easily specified with EnFuzion using the Preparator. The parameters for this application include the following:

  • Spice netlist to specify the circuit
  • initial conditions for the circuit
  • supply voltages
  • capacitive loads
  • temperature

This figure shows how to specify supply voltage PVDD in the Preparator.

 

 

Specifying execution commands
Execution commands tell EnFuzion the input and output files for each job and how to execute user commands on remote machines. Preparator's intuitive user interface simplifies the composition of these commands. The interface allows you to specify

  • a preprocessing step in the main computer
  • input files to the job
  • the main task to be executed on a remote machine
  • output files
  • preprocessing step on the main computer

Preparing Spice input files
It is simple to modify existing input files for use with EnFuzion. In places where you have a real value representing an input parameter, replace that value with a parameter placeholder. For example, in the following code, the pvss value of 2.5 was replaced with the placeholder $pvss:

* previous line in a Spice file
.param pvdd=2.5 pvss=-2.5

* modified line in a Spice file
.param pvdd=$pvdd pvss=$pvss
Here is the complete Spice template for this application:
test circuit: ac analysis of an opamp (a simplified example)
******************************************************
* $pvdd and $pvss will be replaced with real values by EnFuzion
.param pvdd=$pvdd pvss=$pvss
*
* $opamp_netlist will be replaced with real values by EnFuzion
.include $opamp_netlist.spi
*
* $initial_cond will be replaced with real values by EnFuzion
.load FILE=$opamp_initial.ic
*
* $cloadp and $cloadn will be replaced with real values by EnFuzion
cloadp o1p agnd $cloadp
cloadn o1n agnd $cloadn
*
* $temp will be replaced with real values by EnFuzion
.temp $temp
.ac dec 10 10 100meg
*
* $process_param will be replaced with real values by EnFuzion
.lib $process_param
.end

Specifying parameter values
The preceding steps produce the following plan file, which contains commands for task execution:

parameter opamp_netlist label "Input File" text default "opamp";
parameter opamp_initial label "Initial Conditions" text default "opamp";
parameter pvdd float select anyof 2.25 2.5 2.75 default 2.25 2.75;
parameter pvss float select anyof -2.25 -2.5 -2.75 default -2.25 -2.75;
parameter cloadp text select anyof "5p" "10p" default "5p" "10p";
parameter cloadn text select anyof "5p" "10p" default "5p" "10p";
parameter temp integer range from -50 to 90 step 70;
parameter process_param label "Process Parameters" text select anyof "tm" "cor_mr" "bghigh" "bglow" "wsm" "wpm" "wom" "wzm" default "TM" "cor_mr" "bghigh" "bglow";
task nodestart
    copy $opamp_netlist.i node:.
    copy $opamp_initial.ic node:.
    copy $process_param node:.
endtask
task main
    node:substitute $opamp_netlist.i input
    node:execute hspice input output.o
    copy node:output.o output.$jobname
    copy node:output.ac0 output.$jobname.ac0
endtask

The next step is to specify the values of input parameters for a particular run using Generator. Generator builds a graphical interface for each application based on the information in the plan file. The following figure shows the interface built by Generator; it shows that the selected input combination produced 192 different scenarios with different input conditions. Each scenario represents one job to be executed.

 

 

Executing jobs
Jobs are executed by the Dispatcher. The Dispatcher manages file copying and execution on remote machines. It starts servers on remote machines and allocates the jobs; no user intervention on remote machines is required. The Dispatcher provides informative displays to show the progress of the computation. An initial display of the Dispatcher for this example is shown in the following figure.

 

 

The total execution time depends on the complexity of the simulated circuit and on the power of machines in EnFuzion configuration. For example, if a single job takes an average of ten minutes, the computation with 192 different scenarios would take 32 hours to complete on one computer. If sixteen computers are used, the computation could be run in only two hours.

Collecting results
Results are collected by EnFuzion to files output.* and output.*.ac0 as specified in the Output Files dialog. These results can be presented by a standard visualization package. A sample display of results from an AC analysis is shown here.

 

 

Further Information
This application note describes some basic capabilities of EnFuzion. It uses EnFuzion 6.0 release. You can find out more about using EnFuzion from the user manual or on the Axceleon Web site at www.axceleon.com.

 
Copyright © 2002 Axceleon Inc. All Rights Reserved