Quantcast
Channel: Analog/Custom Design
Viewing all articles
Browse latest Browse all 750

Spectre Tech Tips: Selecting Limits for Parameter Value Warnings

$
0
0

 You can accept Cadence default soft limits that determine when you receive warning messages about parameter values, or you can enter your own limits. You can also control which parameters the Spectre simulator checks. This section gives you instructions for all.

Creating a Parameter Range Limits File

In some circumstances, you might want to set your own parameter limits for warning messages. This might be the case, for example, if you are maintaining your own sets of model libraries. If you want to choose your own parameter limits for warnings, you must use a text editor to create a parameter range limits file.

A parameter range limits file requires the following syntax. Fields enclosed by single brackets ([]) are optional.

[ComponentKeyword] [model] [LowerLimit <[=]] [|]Param[|] <[=] UpperLimit]

Observe the following syntax rules for a parameter limits file:

  • You can specify limits for input, output, or operating-point parameters for either component instances or models.
  • You must specify the limits for each parameter on a single line.
  • You can specify open bounds using angle brackets (<) or closed bounds using an angle bracket with an equal sign (<=). If you specify closed bounds, there can be no space between < and =.
  • You can specify inclusive or exclusive ranges. If you specify exclusive ranges, the upper limit must be smaller than the lower limit.

The diagram on the following pages shows you the proper formats for range specifications.

  • The component keyword must be a Spectre name, not a name used for SPICE compatibility. For example, use mos3 rather than mos.
  • If you specify more than one parameter limit for a component, you need to specify the component keyword only once. The Spectre simulator assumes the keyword is unchanged from the previous parameter unless you specify a new component keyword.
  • If you give a parameter limit more than once, your last instructions override previous limits.
  • If you mention a parameter but give it no limits, all limits are disabled for that parameter.
  • You can specify limits for integer, real, or enumerated parameters. Enumerated parameters are those that take only predefined values (such as yes or no and all or none).

To specify limits on enumerated parameters, use the index of the enumeration in the limits declaration for that parameter. To find the index of a parameter of the component name, see the parameter listings for the component name in the Spectre online help (spectre -h) and count the enumerations in the limits declaration starting from zero.

For example, to specify that the BJT operating-point parameter region should not be rev (reversed), look for the region parameter in the parameter listings for the BJT component. The region parameter is described as follows:

region=fwd Estimated operating region. Spectre outputs a number (0-4) in rawfile. Possible values are off, fwd, rev, sat, and breakdown.

For this parameter, off has index 0, fwd has index 1, rev has index 2, and sat has index 3. To specify a limit that notifies you if any BJT is reversed, use either of the following specifications:
2 < region < 2
or
3 <= region <= 1

  • You must give the keyword model when you place limits on model parameters. If you do not give the keyword model, the limits are applied to instance parameters.
  • You can indicate upper or lower limits for the absolute value of a parameter with the vertical line character(|vto|).
    For example,
    resistor 0.1 < |r| < 1M
    specifies that the absolute value of r should be greater than 0.1 ohm and less than 1 megohm. There can be no spaces between the absolute value symbols and the parameter name.
  • You currently cannot place limits on vector parameters.
  • You can write parameter limits using Spectre native-mode scale factors. For example, you can write the limit
    f <= 1.0e6
    as
    f <= 1M

Example of a Parameter Range Limits File

Consider the following netlist “input.scs”


simulator lang=spectre
global 0

R1 (n1 n2) resistor r=8k m=2
R2 (n2 0) resistor r=1k m=1

V1 (n1 0) vsource type=dc dc=1

info0 info what=input where=file file="input.txt"
info1 info what=output where=file file="output.txt"
info2 info what=oppoint where=file file="oppoint.txt"


Consider the following parameter limit file “resistor.lmts”

; resistor soft parameter range limits

; input parameters
resistor 0.1 <= r <= 1e3
resistor 0.1 <= m <= 1

; output parameters
resistor 0.1 <= reff <= 1e3
resistor 0.1 <= meff <= 1

; oppoint parameters
resistor 0.1 <= res <= 1e3
resistor 0 < pwr < 100u

You can find the parameter names (r, m, reff, meff, res, pwr) and component keywords (resistor) in the parameter listings in the Spectre online help (spectre -h resistor). This example instructs the Spectre simulator to issue warnings for these conditions:

  • If input parameter r is outside the range of 0.1 ohms to 1e3 ohms.
  • If input parameter m is outside the range of 0.1 to 1.
  • If output parameter reff is outside the range of 0.1 ohms to 1e3 ohms.
  • If output parameter meff is outside the range of 0.1 to 1.
  • If oppoint parameter res is outside the range of 0.1 ohms to 1e3 ohms.
  • If oppoint parameter pwr is outside the range of 0 to 100u W.

Run Spectre with the following command line having +param:

spectre input.scs +param resistor.lmts

Following warnings will be present in output log "input.log".

Notice, each warning in color correlates with limit specified in resistor.lmts


Time for Elaboration: CPU = 21.543 ms, elapsed = 21.7299 ms.
Time accumulated: CPU = 250.886 ms, elapsed = 218.78 ms.
Peak resident memory used = 105 Mbytes.


Notice from spectre during hierarchy flattening.
R1: `r' has the unusually large value of 8 kOhm.
R1: `m' has the unusually large value of 2.


Time for EDB Visiting: CPU = 713 us, elapsed = 735.044 us.
Time accumulated: CPU = 251.736 ms, elapsed = 219.689 ms.
Peak resident memory used = 105 Mbytes.


Circuit inventory:

nodes 2
resistor 2
vsource 1

Analysis and control statement inventory:

info 3


Notice from spectre during initial setup.
R1: `reff' has the unusually large value of 4 kOhm.
R1: `meff' has the unusually large value of 2.

Time for parsing: CPU = 4.243 ms, elapsed = 7.43198 ms.
Time accumulated: CPU = 256.102 ms, elapsed = 227.262 ms.
Peak resident memory used = 107 Mbytes.

~~~~~~~~~~~~~~~~~~~~~~
Pre-Simulation Summary
~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~
info0: writing input parameter values to file `input.txt'.
info1: writing output parameter values to file `output.txt'.
info2: writing operating point information to file `oppoint.txt'.

Notice from spectre during check, during DC analysis, during info `info2'.
R1: `res' has the unusually large value of 4 kOhm.
R1: `pwr' has the unusually large value of 160 uW.


Aggregate audit (5:40:49 PM, Wed Sep 27, 2023):
Time used: CPU = 267 ms, elapsed = 267 ms, util. = 100%.
Time spent in licensing: elapsed = 56.6 ms, percentage of total = 21.2%.
Peak memory used = 109 Mbytes.
Simulation started at: 5:40:49 PM, Wed Sep 27, 2023, ended at: 5:40:49 PM, Wed Sep 27, 2023, with elapsed time (wall clock): 267 ms.
spectre completes with 0 errors, 0 warnings, and 7 notices.

Entering a Parameter Range Limits File

You can enter a parameter range limits file in two ways:

  • Type the +param <filename> option of the spectre command from the command line or place it in an environment variable. <filename> is the name of the parameter range limits file. In the following example, limits3 is the range limits file for this simulation of test.circuit.
    spectre +param limits3 test.circuit
  • Read the parameter limits file from within another file by putting an include statement with a syntax like the following example in your netlist.
    include "filename"
    filename is the name you give to the range limits file.

Related Resources

You may also contact your Cadence Customer Support for guidance.

For more information on Cadence products and services, visit www.cadence.com.

 
About Spectre Tech Tips

Spectre Tech Tips is a blog series aimed at exploring the capabilities and potential of Spectre® circuit simulator. In addition to providing insight into the useful features and enhancements in Spectre, this series broadcasts the voice of different bloggers and experts, who share their knowledge and experience on all things related to Spectre. Enter your email address in the Subscriptions box and click SUBSCRIBE NOW to receive notifications about our latest Spectre Tech Tips posts.


Viewing all articles
Browse latest Browse all 750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>