
























































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Exam; Class: ELECTRONICS II; Subject: Electrical & Computer Engineer; University: Oregon State University; Term: Fall 1998;
Typology: Exams
1 / 64
This page cannot be seen from the preview
Don't miss anything!
Star-Hspice Manual, Release 1998.2 10-
An electrical circuit must be designed to the tolerances associated with the specific manufacturing process. The electrical yield refers to the number of parts that meet the electrical test specifications. Maximizing the yield is important for the overall process efficiency. Star-Hspice analyzes the yield by using statistical techniques and observing the effects of element and model parameter variation. n Specifying Analytical Model Types n Using Algebraic Expressions n Using Built-In Functions n Using Parameters in Simulation n Varying Parameters and Libraries n Performing Worst Case Analysis n Performing Monte Carlo Analysis n Worst Case and Monte Carlo Sweep Example n Simulating Circuit and Model Temperatures
Specifying Analytical Model Types Analyzing Electrical Yields
10-2 Star-Hspice Manual, Release 1998.
You can model parametric and statistical variation in circuit behavior in Star- Hspice by using: n The .PARAM statement. Use to investigate the performance of a circuit as specified changes in circuit parameters are made. n Monte Carlo Analysis. The statistical standard deviations of component values are known. Use for centering a design for maximum process yield, or for determining component tolerances. n Worst Case Corners Analysis. The component value limits are known. Automates quality assurance for basic circuit function for process extremes, quick estimation of speed and power trade-offs, and best case and worst case model selection through parameter corners library files. n Data Driven Analysis. Use for cell characterization, response surface, or Taguchi analysis. See Chapter 19, Performing Cell Characterization. Automates cell characterization, including timing simulator polynomial delay coefficient calculation. There is no limit on the number of parameters simultaneously varied or number of analyses to be performed. Convenient ASCII file format for automated parameter value generation. Can replace hundreds or thousands of Star-Hspice runs. Yield analyses are used to modify DC operating points, DC sweeps, AC sweeps, and transient analysis. They can generate scatter plots for operating point analysis and family of curves plots for DC, AC, and transient analysis. The .MEASURE statement in Star-Hspice is used with yield analyses, allowing you to see distributions of delay times, power, or any other characteristic described with a .MEASURE statement. Often, this is more useful than viewing a family of curves generated by a Monte Carlo analysis. When the .MEASURE statement is used, a table of results is generated as an .mt# file, which is in readable ASCII format, and can be displayed in AvanWaves. Also, when .MEASURE statements are used in a Monte Carlo or data driven analysis, the
Using Algebraic Expressions Analyzing Electrical Yields
10-4 Star-Hspice Manual, Release 1998.
You can replace any parameter defined in the netlist by an algebraic expression with quoted strings. Then, use these expressions as output variables in the .PLOT, .PRINT, and .GRAPH statements. Using algebraic expressions can expand your options in the input netlist file. Use algebraic expressions in the following ways: n Scaling or changing of element and model parameters n Parameterization: .PARAM x= n Algebra: .PARAM x=’y+3’ n Functions: .PARAM rho(leff,weff)=’2+leffweff-2u’ n Hierarchical subcircuit algebraic parameter passing .subckt inv in out wp=10u wn=5u qbar_ic=vdd .ic qbar=qbar_ic ... .ends n Algebra in elements: R1 1 0 r=’ABS(v(1)/i(m1))+10’ n Algebra in .MEASURE statements: .MEAS vmax MAX V(1) .MEAS imax MAX I(q2) .MEAS ivmax PARAM=’vmax*imax’ n Algebra in output statements: .PRINT conductance=PAR(‘i(m1)/v(22)’) Star-Hspice uses double-precision numbers (15 digits) for expressions, user- defined parameters, and sweep variables. For better precision, use parameters instead of constants in algebraic expressions, since constants are only single- precision numbers (7 digits).
Analyzing Electrical Yields Using Algebraic Expressions
Star-Hspice Manual, Release 1998.2 10-
Algebraic Expressions for Output The syntax is: PAR(‘algebraic expression’) In addition to using quotations, the expression must be defined inside the PAR( ) statement for output.The continuation character for quoted parameter strings is a double backslash, “\”. (Outside of quoted strings, the single backslash, “\”, is the continuation character.)
Analyzing Electrical Yields Using Built-In Functions
Star-Hspice Manual, Release 1998.2 10-
Star-Hspice reserves the variable names listed in Table 10-2: for use in elements such as E, G, R, C, and L. You cannot use them for any other purpose in your netlist (in .PARAM statements, for example).
exp(x) exponential math Returnse raised to the power x:ex db(x) decibels math Returns the base 10 logarithm of the absolute value of x, multiplied by 20, with the sign of x: (sign of x)20log 10 (|x|) int(x) integer math Returns the largest integer less than or equal to x sgn(x) return sign math Returns -1 if x is less than 0, 0 if x is equal to 0, and 1 if x is greater than 0 sign(x,y) transfer sign math Returns the absolute value of x, with the sign of y: (sign of y)|x| min(x,y) smaller of two args control Returns the numeric minimum of x and y max(x,y) larger of two args control Returns the numeric maximum of x and y lv(
element templates various Returns various element values during simulation. See “Element Template Output” on page 4-35 for more information. v(
circuit output variables
various Returns various circuit values during simulation. See “Transient Sigma Sweep Results” on page 10-53 for more information.
Table 10-1: Star-Hspice Built-in Functions
HSPICE Form Function Class Description
Using Built-In Functions Analyzing Electrical Yields
10-8 Star-Hspice Manual, Release 1998.
An expression can contain parameters that have not yet been defined. A function must have at least one argument, and not more than two. Functions can be redefined.
Syntax fname1 (arg1, arg2) = expr1 (fname2 (arg1, ...) = expr2) off where: fname specifies function name. This parameter must be distinct from array names and built-in functions. Subsequently defined functions must have all their embedded functions previously defined. arg1, arg2 specifies variables used in the expression off voids all user-defined functions
Example f(a,b)=POW(a,2)+ab g(d)=SQRT(d) h(e)=ef(1,2)−g(3)
Table 10-2: Star-Hspice Special Variables
HSPICE Form Function Class Description
time current simulation time
control Parameterizes the current simulation time during transient analysis.
temper current circuit temperature
control Parameterizes the current simulation temperature during transient/temperature analysis.
hertz current simulation frequency
control Parameterizes the frequency during AC analysis.
Using Parameters in Simulation Analyzing Electrical Yields
10-10 Star-Hspice Manual, Release 1998.
.PARAM Steps= 10 .TRAN Step=StepSize Start=0ns Stop=’StepSize*Steps’ All parameter values in Star-Hspice are IEEE double floating point numbers.
Note: The statements above show the proper way to define supplies that will be changed using an .ALTER statement. ALTER does not support redefinition of voltage sources—only their parameterized values.
Parameter resolution order is as follows:
Table 10-3: – Parameter Passing Order
.OPTION PARHIER=GLOBAL .OPTION PARHIER=LOCAL Analysis sweep parameters Analysis sweep parameters .PARAM statement (library) .SUBCKT call (instance) .SUBCKT call (instance) .SUBCKT definition (symbol) .SUBCKT definition (symbol) .PARAM statement (library)
Analyzing Electrical Yields Using Parameters in Simulation
Star-Hspice Manual, Release 1998.2 10-
Parameters in Star-Hspice are names that have associated numeric values. You can use any of the following methods to define parameters:
Simple Parameter Value Assignment A simple parameter assignment is a constant real number. The parameter keeps this value unless there is a later definition that changes its value, or it is assigned a new value by an algebraic expression during simulation. There is no warning if a parameter is reassigned.
Syntax: .PARAM
Example .PARAM TermValue = 1g rTerm Bit0 0 TermValue rTerm Bit1 0 TermValue rTerm Bit2 0 TermValue ...
n Simple parameter .PARAM
n Algebraic defintition .PARAM
n User-defined function .PARAM <MyFunc( x, y )> = ’Sqrt((xx)+(yy))’
n Subcircuit default .SUBCKT
n Predefined analysis function
PARAM
n .MEASURE statement
MEASURE
Analyzing Electrical Yields Using Parameters in Simulation
Star-Hspice Manual, Release 1998.2 10-
User-Defined Function Parameters A user-defined function assignment is similar to the definition of an algebraic parameter definition. Star-Hspice extends the algebraic parameter definition to include function parameters that are used in the algebraic that defines the function. User defined functions cannot be nested more than three deep.
Syntax .PARAM
Example .PARAM CentToFar (c) = ’(((c9)/5)+32)’ .PARAM F(p1,p2) = ’Log(Cos(p1)Sin(p2))’ .PARAM SqrdProd (a,b) = ’(aa)(b*b)’
Subcircuit Default Definitions The specification of hierarchical subcircuits allows you to pick default values for circuit elements. This is typically used in cell definitions so the circuit can be simulated with typical values.
Syntax .SUBCKT
Subcircuit Default Definitions Examples
The following example implements an inverter with a Strength parameter. By default, the inverter can drive three devices. By entering a new value for the parameter Strength in the element line, the user can select larger or smaller inverters to suit the application. .SUBCKT Inv a y Strength = 3 Mp1
Using Parameters in Simulation Analyzing Electrical Yields
10-14 Star-Hspice Manual, Release 1998.
... xInv0 a y0 Inv $ Default devices: p device = 6u,
Scoping and Default Overrides Example
Given the input netlist fragment: .PARAM DefPwid = 1u
.SUBCKT Inv a y DefPwid = 2u DefNwid = 1u Mp1
Using Parameters in Simulation Analyzing Electrical Yields
10-16 Star-Hspice Manual, Release 1998.
The .PARAM statement is also used to define parameters for Star-Hspice Monte Carlo analysis. See Performing Monte Carlo Analysis, -39 for more information. The syntax is: .PARAM
Example .PARAM LithOffsetX=AGAUSS(0u,0.1u,3) ... .TRAN <tran_time_spec> SWEEP MONTE= ... The statements above produce 30 randomly generated Gaussian-distributed values, centered on 0 μ and with a three-sigma spread of 0.1 μ.
Table 10-4: Syntax for Parameter Lists for Monte Carlo Analysis Functions
nominal_val, rel_variation <, multiplier>
AUNIF() Absolute variation of a uniform distribution
nominal_val, abs_variation <, multiplier>
GAUSS() Relative variation of a Gaussian distribution
nominal_val, rel_variation, sigma <, multiplier>
AGAUSS() Absolute variation of a Gaussian distribution
nominal_val, abs_variation, sigma <, multiplier>
LIMIT() Random choice of limit values
nominal_val, abs_variation <, multiplier>
Analyzing Electrical Yields Using Parameters in Simulation
Star-Hspice Manual, Release 1998.2 10-
Measurement Parameters .MEASURE statements in Star-Hspice produce a type of parameter called a measurement parameter. In general, the rules for measurement parameters are the same as the rules for standard parameters, with one exception: measurement parameters are not defined in a .PARAM statement, but are defined directly in a .MEASURE statement. Measurement parameter results produced by .PARAM statements in .SUBCKT blocks cannot be used outside the subcircuit. That means measurement parameters defined in .SUBCKT statements cannot be passed as bottom-up parameters in hierarchial designs. Measurement parameter names cannot conflict with standard parameter names. Star-Hspice issues an error message if it encounters a measurement parameter with the same name as a standard parameter definition.
Syntax .MEASURE
Example: Measurement Parameter Definition .MEASURE TRAN tSlope Trig v(In) Val = ’Vdd * 0.1’ Rise = 1
Example: Measurement Parameter Conflicts
For the input netlist fragment
Analyzing Electrical Yields Using Parameters in Simulation
Star-Hspice Manual, Release 1998.2 10-
The way you choose to handle hierarchical parameters depends on how you construct and analyze your cells. You can choose to construct a design in which information flows from the top of the design down into the lowest hierarchical levels. Centralizing the control at the top of the design hierarchy involves setting global parameters. You can also choose to construct a library of small cells that are individually controlled from within by setting local parameters, and build upwards to the block level. This section describes the scope of Star-Hspice parameter names, and how Star- Hspice resolves naming conflicts between levels of hierarchy.
Library Integrity Integrity is a fundamental requirement for any symbol library. Library integrity can be as simple as a consistent, intuitive name scheme, or as complex as libraries with built-in range checking. You can risk poor library integrity when using libraries from different vendors in a single design. Because there is no standardization between vendors on what circuit parameters are named, it is possible that two components can include the same parameter name with different functions. Suppose that the first vendor builds a library that uses the name Tau as a parameter to control one or more subcircuits in their library. Now suppose that the second vendor uses Tau to control a different aspect of their library. Setting a global parameter named Tau to control one library also modifies the behavior of the second library, which might not be the intent. When the scope of a higher level parameter is global to all subcircuits at lower levels of the design hierarchy, lower level parameter values are overridden by the values from higher level definitions if the names are the same. The scope of a lower level parameter is local to the subcircuit in which the parameter is defined (but global to all subcircuits that are even lower in the design hierarchy). The local scoping rules in Star-Hspice solve the problem of lower level parameters being overridden by higher level parameters of the same name when that is not desired.
Using Parameters in Simulation Analyzing Electrical Yields
10-20 Star-Hspice Manual, Release 1998.
Reusing Cells Problems with parameter names also occur when different groups collaborate on a design. Because Star-Hspice global parameters prevail over local parameters, all designers are required to know the names of all parameters, even those used in sections of the design for which they are not responsible. This can lead to a large investment in standardized libraries. You can avoid this situation by using local parameter scoping that encapsulates all information about a section of a design within that section.
Creating Parameters in a Library To ensure that critical, user-supplied parameters are present in a Star-Hspice netlist at simulation time, Star-Hspice allows the use of “illegal defaults”—that is, defaults that cause the simulator to abort if there are no overrides for the defaults. Library cells that include illegal defaults require that the user provide a value for each and every instance of those cells. Failure to do so causes the Star-Hspice simulation to abort. An example is the use of a default MOSFET width of 0.0. This causes Star- Hspice to abort because this parameter is required by the HSPICE MOSFET models. Consider the following example:
Example 1 ...