Optimization, the automatic generation of model parameters and component values from a given set of electrical specifications or measured data, is available in Star-Hspice. With a user-defined optimization program and a known circuit topology, Star-Hspice automatically selects the design components and model parameters to meet DC, AC, and transient electrical specifications.
Star-Hspice optimization is the result of more than ten years of research in both the optimizing algorithms and user interface. The optimizing function is integrated into the core of Star-Hspice, resulting in optimum efficiency. The circuit result targets are part of the .MEASURE command structure, and the parameters to be optimized are Star-Hspice-defined parameter functions. A .MODEL statement sets up the optimization.
The most powerful feature of the Star-Hspice approach is its incremental optimization technique. Incremental optimization allows you to solve the DC parameters first, then the AC parameters, and finally the transient parameters. A set of optimizer measurement functions not only makes the task of transistor optimization easy, but significantly improves cell and whole circuit optimization.
To perform optimization, create an input netlist file specifying:
Given the input netlist file, optimization specifications, component limits, and initial guess, the optimizer reiterates the circuit simulation until the target electrical specification is met or an optimized solution is found.
For improved optimization and simulation time and to increase the likelihood of a convergent solution, the initial estimate of the component values should produce a circuit with specifications near those of the original target. This reduces the number of times the optimizer reselects component values and resimulates the circuit.
The length of time to complete an optimization is a function of the number of iterations allowed, the relative input tolerance, the output tolerance, and the gradient tolerance. The default values are satisfactory for most applications. Generally, 10 to 30 iterations are sufficient to get accurate optimizations.
Set the simulator with tighter convergence options than normal for optimization. The following options are suggested:
For DC MOS model optimizations:
absmos=1e-8
relmos=1e-5
relv=1e-4
For DC JFET, BJT, and diode model optimizations:
absi=1e-10
reli=1e-5
relv=1e-4
Use optimization to curve fit user-defined DC, AC, or transient data. In a curve fit optimization, the desired numeric data for curves is stored in the data file as in-line data using the .DATA statement. The variable circuit components and parameter values of the netlist are specified in the .PARAM xxx=OPTxxx statement. The optimization analysis statements call the in-line data using the DATA= keyword. The .MEASURE statement uses the simulation result and compares it with the values given in the data file. The .MEASURE statement controls the comparison of simulation results to the values given in the data file. This is usually done with the ERR1 keyword. If the calculated value is not within the error tolerances specified in the optimization model, a new set of component values are selected and the circuit is resimulated. This is repeated until the closest fit to the curve is obtained, or the error tolerances set is satisfied.
Goal optimization differs from curve fit optimization in that it usually only applies to the optimization of a particular electrical specification, such as rise time or power dissipation.
Goal optimizations are specified using the GOAL keyword with a choice of relational operator in the .MEASURE statement, where GOAL is the target electrical specification being measured. This choice of relational operator is useful in multiple-constraint optimizations, when the absolute accuracy of some criteria is less important than for others.
To analyze circuit timing violation, Star-Hspice uses a binary search algorithm to generate a set of operational parameters that produce a failure in the required behavior of the circuit. When a circuit timing failure occurs, you can identify a timing constraint that can lead to a design guideline. Typical types of timing constraint violations include:
Bisection is a method of optimization that finds the value of an input variable (target value) associated with a goal value of an output variable. The input and output variables can be of various types (for example, voltage, current, delay time, or gain) related by some transfer function. You can use the bisection feature in a pass-fail mode or a bisection mode. The process is largely the same in each case.
Several Star-Hspice statements are required for optimization.
The .PARAM statement lets you specify initial, lower, and upper bound values. The types of .MEASURE statements available for optimization are described in Specifying Simulation Output.
Output statements .PRINT, .PLOT, and .GRAPH must be associated with the analysis statements .DC, .AC, or .TRAN. An analysis statement with the keyword OPTIMIZE is used for optimization only. To generate output for the optimized circuit, another analysis statement (.DC, .AC, or .TRAN) must be specified, along with the output statements. The proper specification order is:
1. Analysis statement with OPTIMIZE
2. .MEASURE statements specifying optimization goals or error functions
3. Ordinary analysis statement
.DC <DATA=filename> SWEEP OPTIMIZE=OPTxxx RESULTS=ierr1 ...
+ ierrn MODEL=optmod
.AC <DATA=filename> SWEEP OPTIMIZE=OPTxxx RESULTS=ierr1 ...
+ ierrn MODEL=optmod
.TRAN <DATA=filename> SWEEP OPTIMIZE=OPTxxx RESULTS=ierr1
+ ... ierrn MODEL=optmod
.PARAM parameter=OPTxxx (initial_guess, low_limit, upper_limit)
.PARAM parameter=OPTxxx (initial_guess, low_limit, upper_limit,
+ delta)
.PARAM vtx=OPT1(.7,.3,1.0) uox=OPT1(650,400,900)
In the above example, the parameters uox and vtx are the variable model parameters to optimize a model for a given set of electrical specifications. The parameter vtx is given an initial value estimate of 0.7 volts and can be varied within the limits of 0.3 and 1.0 volts for the optimization procedure. The optimization parameter reference name, OPT1, is used to reference the associated optimization analysis statement (not shown).
For each optimization within a data file, specify a .MODEL statement to allow for more than one optimization per simulation run to be executed. The optimization .MODEL statement defines the convergence criteria, number of iterations, and derivative methods.
.MODEL mname OPT <parameter=val ...>
You can specify the following OPT parameters in the .MODEL statement: