Docsity

Chapter 11: Optimizing Performance - Lecture Notes | ECE 323, Study notes of Electronics

Toggle sidebar
bg1
hspice.book : hspice.ch11 1 Thu Jul 23 19:10:43 1998
Star-Hspice Manual, Release 1997.2 11-1
Chapter 11
Optimizing Performance
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.
This chapter covers the following topics:
■Performing Optimization
■Understanding the Statements Syntax
■Examining Optimization Examples
■Performing Timing Analysis
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a

Partial preview of the text

Download Chapter 11: Optimizing Performance - Lecture Notes | ECE 323 and more Study notes Electronics in PDF only on Docsity!

Star-Hspice Manual, Release 1997.2 11-

Chapter 11

Optimizing Performance

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. This chapter covers the following topics: n Performing Optimization n Understanding the Statements Syntax n Examining Optimization Examples n Performing Timing Analysis

Performing Optimization Optimizing Performance

11-2 Star-Hspice Manual, Release 1997.

Performing Optimization

To perform optimization, create an input netlist file specifying: n Minimum and maximum parameter and component limits n The variable parameters and components n An initial estimate of the selected parameter and component values n The circuit performance goals or model-versus-data error function 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.

Optimization Control

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.

Simulation Accuracy

Set the simulator with tighter convergence options than normal for optimization. The following options are suggested: For DC MOS model optimizations: absmos=1e- relmos=1e- relv=1e- For DC JFET, BJT, and diode model optimizations:

Understanding the Statements Syntax Optimizing Performance

11-4 Star-Hspice Manual, Release 1997.

Understanding the Statements Syntax

Several Star-Hspice statements are required for optimization. n .MODEL modname OPT ... n .PARAM parameter=OPTxxx (init, min, max) n A .DC, .AC, or .TRAN analysis statement with MODEL=modname, OPTIMIZE=OPTxxx, and RESULTS=measurename n .MEASURE measurename ... <GOAL = | < | > val> – note that a space is required on either side of the relational operator =, <, or > The .PARAM statement lets you specify initial, lower, and upper bound values. The types of .MEASURE statements available for optimization are described in Chapter 4, 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
  4. Output statements

Optimizing Performance Understanding the Statements Syntax

Star-Hspice Manual, Release 1997.2 11-

Analysis Statement Syntax (.DC, .TRAN, .AC)

The syntax is: .DC <DATA=filename> SWEEP OPTIMIZE=OPTxxx RESULTS=ierr ...

  • ierrn MODEL=optmod or .AC <DATA=filename> SWEEP OPTIMIZE=OPTxxx RESULTS=ierr ...
  • ierrn MODEL=optmod or .TRAN <DATA=filename> SWEEP OPTIMIZE=OPTxxx RESULTS=ierr
  • ... ierrn MODEL=optmod where: DATA specifies the in-line file of parameter data to use in the optimization OPTIMIZE indicates the analysis is for optimization. Specifies the parameter reference name used in the .PARAM optimization statement. All .PARAM optimization statements with the parameter reference name selected by OPTIMIZE will have their associated parameters varied during an optimization analysis. MODEL the optimization reference name that is also specified in the .MODEL optimization statement RESULTS the measurement reference name that is also specified in the .MEASURE optimization statement. RESULTS is used to pass analysis data to the .MEASURE optimization statement.

Optimizing Performance Understanding the Statements Syntax

Star-Hspice Manual, Release 1997.2 11-

.MODEL Statement Syntax

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. The syntax is: .MODEL mname OPT <parameter=val ...> You can specify the following OPT parameters in the .MODEL statement: mname model name. Elements refer to the model by this name. CENDIF represents the point at which more accurate derivatives are required. When the gradient of the RESULTS functions are less than CENDIF, the more time-consuming derivative methods are used. Values of 0.1 to 0.01 are suitable for most applications. If too large a value is used, the optimizer requires more CPU time. If too small a value is used, it might not find as accurate an answer. Default=1.0e-9. CLOSE the initial estimate of how close the parameter initial value estimates are to the final solution. CLOSE multiplies the changes in the new parameter estimates. A large value for CLOSE causes the optimizer to take large steps toward the solution and a small value causes the optimizer to take smaller steps toward the solution. CLOSE should range from 0.01 for very close parameter estimates to 10 for rough initial guesses. Default=1.0. If CLOSE is greater than 100, the steepest descent part of the Levenburg-Marquardt algorithm dominates. For CLOSE less than 1, the Gauss-Newton method dominates. For further details, see L. Spruiell, “Optimization Error Surfaces,” Meta-Software Journal, Vol. 1, No. 4, December

Understanding the Statements Syntax Optimizing Performance

11-8 Star-Hspice Manual, Release 1997.

CUT modifies CLOSE, depending on how successful the iterations toward the solution become. If the last iteration was successful, descent toward the solution CLOSE is decreased by CUT. If the last iteration was not a successful descent to the solution, CLOSE is increased by CUT squared. CUT drives CLOSE up or down depending on the relative success in finding the solution. The CUT value must be greater than 1. Default = 2.0. DIFSIZ determines the increment change in a parameter value for gradient calculations ( ∆ x = DIFSIZ ⋅ max(x, 0.1 ) ). If delta is specified in a .PARAM statement, then ∆ x = delta. Default = 1e-3. GRAD represents a possible convergence when the gradient of the RESULTS function is less than GRAD. Values of 1e-6 to 1e- 5 are suitable for most applications. If too large a value is used, the optimizer could stop before the best solution is found. Too small a value requires more iterations. Default=1.0e-6. ITROPT sets the maximum number of iterations. Typically no more than 20-40 iterations are needed to find a solution. Too many iterations can imply the values for RELIN, GRAD, or RELOUT are too small. Default=20. LEVEL selects the optimizing algorithm to use. Currently, the only option is LEVEL=1, a modified Levenburg-Marquardt algorithm. MAX sets the upper limit on CLOSE. Values greater than 100 are recommended. Default=6000. PARMIN allows better control of incremental parameter changes during error calculations. This produces more control over the trade-off between simulation time and optimization result accuracy. Star-Hspice calculates parameter increments using the relationship: ∆ par_val = DIFSIZ ⋅ MAX( par_val , PARMIN)

Examining Optimization Examples Optimizing Performance

11-10 Star-Hspice Manual, Release 1997.

Examining Optimization Examples

This section provides examples of the following types of Star-Hspice optimizations: n MOS Level 3 Model DC Optimization n MOS Level 13 Model DC Optimization n RC Network Optimization n CMOS Tristate Buffer Optimization n BJT S-Parameters Optimization n BJT Model DC Optimization n GaAsFET Model DC Optimization n MOS Op-amp Optimization

MOS Level 3 Model DC Optimization

This example shows an optimization of I-V data to a Level 3 MOS model. The data consists of gate curves ( ids versus vgs ) and drain curves ( ids versus vds ). The Level 3 parameters VTO, GAMMA, UO, VMAX, THETA, and KAPPA are optimized. After optimization, the model is compared separately to the data for the gate and drain curves. The option POST generates AvanWaves files for comparing the model to the data.

Level 3 Model DC Optimization Input Netlist File $level 3 mosfet optimization $..tighten the simulator convergence properties .OPTION nomod post=2 newtol relmos=1e-5 absmos=1e- .MODEL optmod OPT itropt=

Circuit Input vds 30 0 vds vgs 20 0 vgs vbs 40 0 vbs m1 30 20 0 40 nch w=50u l=4u $.. $..process skew parameters for this data

Optimizing Performance Examining Optimization Examples

Star-Hspice Manual, Release 1997.2 11-

.PARAM xwn=-0.3u xln=-0.1u toxn=196.6 rshn= $..the model and initial guess .MODEL nch NMOS level=

  • acm=2 ldif=0 hdif=4u tlev=1 n=
  • capop=4 meto=0.08u xqc=0. $...note capop=4 is ok for H8907 and later, otherwise use $...Capop= $...fixed parameters
  • wd=0.15u ld=0.07u
  • js=1.5e-04 jsw=1.8e-
  • cj=1.7e-04 cjsw=3.8e-
  • nfs=2e11 xj=0.1u delta=0 eta= $...process skew parameters
  • tox=toxn rsh=rshn
  • xw=xwn xl=xln

Optimized Parameters

  • vto=vto gamma=gamma
  • uo=uo vmax=vmax theta=theta kappa=kappa .PARAM
  • vto = opt1(1,0.5,2)
  • gamma = opt1(0.8,0.1,2)
  • uo = opt1(480,400,1000)
  • vmax = opt1(2e5,5e4,5e7)
  • theta = opt1(0.05,1e-3,1)
  • kappa = opt1(2,1e-2,5)

Optimization Sweeps .DC DATA=all optimize=opt1 results=comp1 model=optmod .MEAS DC comp1 ERR1 par(ids) i(m1) minval=1e-04 ignor=1e-

DC Sweeps .DC DATA=gate .DC DATA=drain

Print Sweeps .PRINT DC vds=par(vds) vgs=par(vgs) im=i(m1) id=par(ids) .PRINT DC vds=par(vds) vgs=par(vgs) im=i(m1) id=par(ids)

DC Sweep Data $..data .PARAM vds=0 vgs=0 vbs=0 ids=

Optimizing Performance Examining Optimization Examples

Star-Hspice Manual, Release 1997.2 11-

absolute value of par(ids), or by minval=10e-6, whichever is larger. Using minval keeps low current data from dominating the error. n The remaining .DC and .PRINT statements are for printback after optimization. You can be place them anywhere in the netlist input file because they will be correctly assigned when the file is parsed. n The “.PARAM VDS=0 VGS=0 VBS=0 IDS=0” statements simply declare these data column names as parameters. The .DATA statements give data for IDS versus VDS, VGS, VBS. The selection of data should match the choice of model parameters to optimize. To optimize GAMMA, data with back bias must be provided (VBS= -2 in this case). To optimize KAPPA, the saturation region must have data. In this example, the data set “all” contain: gate curves: vds=0.1 vbs=0,-2 vgs=1 to 5 in steps 0. drain curves: vbs=0 vgs=2,3,4,5 vds=0.25 to 5 in steps 0. The results are shown in Figure 11-1:.

Examining Optimization Examples Optimizing Performance

11-14 Star-Hspice Manual, Release 1997.

Figure 11-1: Level 3 MOSFET Optimization

MOS Level 13 Model DC Optimization

This example shows an optimization of I-V data to a Level 13 MOS model. The data consists of gate curves ( ids versus vgs ) and drain curves ( ids versus vds ). This example demonstrates two-stage optimization. The Level 13 parameters vfb0, k1, muz, x2m, and u00 are optimized to the gate data. Then the Level 13 parameters MUS, X3MS, U1, and the impact ionization parameter ALPHA are optimized to the drain data. After optimization, the model is compared to the data. The option POST generates AvanWaves files for comparing the model to the data. The results are shown in Figure 11-2:.

Examining Optimization Examples Optimizing Performance

11-16 Star-Hspice Manual, Release 1997.

Optimization Sweeps .DC DATA=gate optimize=opt1 results=comp1 model=optmod .MEAS DC comp1 ERR1 par(ids) i(m1) minval=1e-04 ignor=1e- .DC DATA=drain optimize=opt2 results=comp2 model=optmod .MEAS DC comp2 ERR1 par(ids) i(m1) minval=1e-04 ignor=1e-

DC Data Sweeps .DC DATA=gate .DC DATA=drain

Print Sweeps .PRINT DC vds=par(vds) vgs=par(vgs) im=i(m1) id=par(ids) .PRINT DC vds=par(vds) vgs=par(vgs) im=i(m1) id=par(ids)

DC Sweep Data $..data .PARAM vds=0 vgs=0 vbs=0 ids= .DATA gate vds vgs vbs ids 1.000000e-01 1.000000e+00 0.000000e+00 1.655500e- 1.000000e-01 5.000000e+00 -2.000000e+00 3.149500e- .ENDDATA .DATA drain vds vgs vbs ids 2.500000e-01 2.000000e+00 0.000000e+00 2.809000e- 5.000000e+00 5.000000e+00 0.000000e+00 4.861000e- .ENDDATA .END

Optimizing Performance Examining Optimization Examples

Star-Hspice Manual, Release 1997.2 11-

Figure 11-2: Level 13 MOSFET Optimization

RC Network Optimization

Following is an example of optimizing the power dissipation and time constant of an RC network. The circuit is a parallel resistor and capacitor. The following design targets are specified. n 1 s time constant n 50 mW rms power dissipation through the resistor The Star-Hspice strategy is as follows: n .MEASURE statement RC1 calculates RC time constant (GOAL of. V corresponds to 1 s time constant e−rc^ ). n .MEASURE statement RC2 calculates the rms power where the GOAL is 50 mW. n OPTrc identifies RX and CX as optimization parameters and sets their starting, minimum, and maximum values.

Optimizing Performance Examining Optimization Examples

Star-Hspice Manual, Release 1997.2 11-

Residual Sum of Squares

The residual sum of squares is a measure of the total error. The smaller this value is, the more accurate the optimization results are.

residual sum of squares =

where E is the error function and ne is the number of error functions.

Norm of the Gradient

The norm of the gradient is another measure of the total error. The smaller this value is, the more accurate the optimization results are. The gradient G is found by

and norm of the gradient =

where P is the parameter and np is the number of parameters to be optimized.

E (^) i 2

i = 1

ne

G (^) j E (^) i ⋅( ∆ E (^) i ⁄∆ P (^) j ) i = 1

ne

2 G (^) j 2

i = 1

np

Examining Optimization Examples Optimizing Performance

11-20 Star-Hspice Manual, Release 1997.

Marquardt Scaling Parameter

This parameter is used in the Levenberg-Marquardt algorithm to find the actual solution of the optimizing parameters. The search direction is a combination of the Steepest Descent method and the Gauss-Newton method. The Steepest Descent method is used initially to approach the solution because it is fast, and then the Gauss-Newton method is used to find the solution. During this process, the Marquardt Scaling Parameter becomes very small, but starts to increase again if the solution starts to deviate. If this happens, the optimizer chooses between the two methods to work toward the solution again. If the optimal solution is not attained, an error message is printed and a large Marquardt Scaling Parameter value is printed.

Number of Function Evaluations

This is the number of analyses (for example, finite difference or central difference) that were needed to find a minimum of the function.

Number of Iterations

This is the number of iterations needed to find the optimized or actual solution.

Optimized Parameters OPTRC

  • %NORM-SEN %CHANGE .PARAM RX = 6.7937 $ 54.5260 50.2976M .PARAM CX = 147.3697M $ 45.4740 33.7653M