Product Documentation
Spectre Classic Simulator, Spectre APS, Spectre X, Spectre XPS, Spectre FMC Analysis, and Legato Reliability Solution User Guide
Product Version 23.1, September 2023

21


Identifying Problems and Troubleshooting

This chapter discusses the following topics:

Error Conditions

Error conditions terminate a Spectre® circuit simulator run. If you receive any of the messages described in this section, you must fix the problem and rerun the simulation.

Invalid Parameter Values That Terminate the Program

If you enter a parameter that causes the Spectre simulator to stop or puts a model in an invalid region, such as giving z0=0 to a transmission line, the Spectre simulator sends you a message like this one and exits.

Error from spectre during hierarchy flattening.
 tl1: Value of 'z0' should be nonzero.
spectre terminated prematurely due to fatal error.

To run the simulation, you must change the parameter to an acceptable value.

Singular Matrices

If you receive an error message that says a matrix is singular, your netlist contains either a floating node which is causing the problem or a loop of zero resistance branches, for example, a loop of voltage sources or inductors. The following procedures might help you find the problem:

Internal Error Messages

If the Spectre simulator detects an internal error, it displays a message like one of the following:

Internal error detected by spectre. Please see http://support.cadence.com/wps/mypoc/cos?uri=deeplinkmin:COSHome for Customer Support contact information. 
Error detected in file 'file.c' at line 101. 
Internal error detected by spectre. Please see http://support.cadence.com/wps/mypoc/cos?uri=deeplinkmin:COSHome for Customer Support contact information. 
Arithmetic exception. 

Cadence can help you find solutions to these problems. If you get one of these messages, call Cadence Customer Support or contact a Cadence application engineer.

Time Is Not Strictly Increasing

PWL takes a wave parameter that accepts time/value pairs. If the time value does not increase, the Spectre simulator displays the following message:

Error found in spectre during initial setup.
v10:time is not strictly increasing in waveform.

Check the PWL component to fix this error.

Spectre Warning Messages

Warning messages tell you about conditions that might cause invalid results. Unlike error messages, warnings do not stop a simulation. When you receive a warning message, you must decide whether the particular condition creates a problem for your simulation. This section describes some common Spectre warning messages. It also tells you how to modify parameters to correct conditions that might produce invalid simulation results.

The Spectre simulator often prints warnings and notices that are eventually determined to be “uninteresting,” and there is a natural tendency after a while to ignore them. We recommend that you carefully study them the first few times you simulate a particular circuit and whenever the simulator gives you unexpected results.

P-N Junction Warning Messages

Almost every semiconductor device includes at least one p-n junction. Normally, these p-n junctions are biased in a particular operating region. Three types of warning messages are available for each p-n junction, one for exceeding a maximum current, one for exceeding a melting current, and one for exceeding a breakdown voltage.

Explosion Region Warnings

Warning from spectre at dc = 191 mA during DC analysis ‘srcSweep'.
mos_mod: The bulk-drain junction current exceeds `imelt'. 
The results computed by Spectre are now incorrect because the junction 
current model has been linearized.

Or

xram.d3247: The junction is melting (increase imax)

The Spectre simulator provides two parameters, imax and imelt, that limit the current across a PN junction. These parameters aid convergence and prevent numerical overflow. The junction characteristics of the device are assumed to be accurately modeled for current up to imax. If imax is exceeded during iterations, the linear model is substituted until the current drops below imax or until convergence is achieved. If convergence is achieved with the current exceeding imax, the results are inaccurate, and Spectre prints a warning similar to the first one above.

The imelt parameter is used as a limit warning for the junction current. This parameter can be set to the maximum current rating of the device. By default it is set to the value of imax. When any component of the junction current exceeds imelt, Spectre issues a warning and again the results become inaccurate. The junction current is linearized above the value of imelt to prevent arithmetic exceptions.

Both these parameters have current density counterparts, jmax and jmelt, that you can specify if you want the absolute current values to depend on the device area.

Melting Current Warnings

A separate model parameter, imelt, is used as a limit warning for the junction current. This parameter can be set to the maximum current rating of the device. When any component of the junction current exceeds imelt, Spectre issues a warning and the results become inaccurate. The junction current is linearized above the value of imelt to prevent arithmetic exception, with the exponential term replaced by a linear equation at imelt.

Breakdown Region Warnings

Messages like the following are breakdown region warnings:

D2: Breakdown voltage exceeded.
Q1: The collector-substrate voltage exceeded breakdown voltage.

The warning message identifies the relevant component name (D2 and Q1) and the affected junction.

The Spectre simulator issues breakdown region warnings only when you specify conditions for them. For information on setting parameters to identify a breakdown region, see “Customizing Error and Warning Messages”

Missing Diode Would Be Forward-Biased

Warning from spectre at time = 501.778 ns during transient analysis tran_to_1u.
i1.q0: Missing collector-substrate diode would be forward biased.
Notice from spectre at time = 510.1688 ns during transient analysis tran_to_1u.
i1.q0: Missing collector-substrate diode returns to normal bias condition.

Most p-n junctions in semiconductor models include both a resistive (the diode) and a capacitive (the junction capacitance) model. If the diode reverse saturation current is set to zero, the resistive part of the junction is turned off, and the Spectre simulator assumes that the resistive portion of the junction does not exist (but the junction capacitance may still be present). In this case, if the voltage across the missing diode is larger than 10 * Vt (where Vt is the thermal voltage), Spectre will issue a warning message telling you that the junction, which is missing, will be forward biased. A follow-up notice is issued if, and when, the device returns to a normal bias condition.

Tolerances Might Be Set Too Tight

When you simulate high-voltage or high-current circuits, the default tolerances might be tight enough to make convergence difficult or impossible. If you get a “Tolerances might be set too tight” message, try relaxing tolerances by increasing the value of reltol, iabstol, and vabstol.

Parameter Is Unusually Large or Small

The Spectre simulator checks the parameter values to see if they are within a normal range of expected values. This check can catch data entry errors or identify situations that can cause the Spectre simulator to have difficulties simulating the circuit.

The “Parameter is unusually large or small” message issues a notice about a parameter value. The message looks like one of the following:

NPNbjt: 'rb' has the unusually small value of 1mOhms. 
PNPbjt: 'tf' has the unusually large value of 1Gs.
OA1.Q16 of ua741: 'region' has the unusual value of rev.

If you receive such a message, check the parameter. If the unusual parameter value is correct, you can ignore this message.

The limits settings that generate these warning messages are soft limits, as opposed to hard limits settings. Hard limits stop a simulation if they are violated. the Spectre simulator has automatic soft limits on a few parameter values. However, you can override these limits or specify your own limits for parameters that do not have automatic limits. For more information, see “Customizing Error and Warning Messages”

gmin Is Large Enough to Noticeably Affect the DC Solution

Warning detected by spectre during DC analysis oppoint.
Gmin=1pS is large enough to noticeably affect the DC solution.

By default, the Spectre simulator (and SPICE) adds a very small conductance of 10-12 siemens called gmin across nonlinear devices. This conductance prevents nodes from floating if the nonlinear devices are turned off. By default, GMIN=1e-12 Siemens. The gmin parameter usually has a minimal effect on circuit behavior. However, some circuits, such as charge storage circuits are very sensitive to the small currents that flow through gmin.

You see a message such as the one given above if the current flowing through the gmin conductors, when treated as an error current, does not meet the gmin criteria. That is, the message is displayed if the current that enters any node from all attached gmin conductors is larger than either iabstol or reltol multiplied by the sum of the absolute value of the individual currents that enter the node.

If your circuit is not sensitive to small leakage currents, you can ignore this message. If your circuit is sensitive to these currents, reduce the gmin value or set it to zero.

Minimum Timestep Used

If this problem occurs, the analysis continues, and a warning message is displayed at each time point that does not meet the convergence criteria. In the Spectre simulator, this is very rare, but it does occur. Occasionally, this needs to be remedied to get the correct solution.

  1. Make sure devices have junction and overlap capacitance specified.
  2. Increase maxiters, but do not go higher than 200.
  3. Change to the gear2 or gear2only method of integration.
  4. Reduce other occurrences of the local truncation error cutting the timestep. Increase lteratio and increase the absolute error tolerances vabstol and iabstol. Do not go too high with any of these.
  5. Combine 2, 3, and 4 and set cmin to prevent instantaneous change at every node in the circuit.
  6. Relax reltol in combination with 5.

Syntax Errors

Warning from spectre in indab_7 during circuit read-in:
na300.scs" 27: `c11': Encountered statement in Spectre format while in Spice language mode. This will not be supported in a future release.

The Spectre parser is dual mode and accepts both the Spectre native language and documented Spice2G6. The default for the Spectre simulator is SPICE. If you include a file written in Spectre native syntax, you must either specify simulator lang=spectre or name the file with a .scs suffix. After Spectre processes the file, it reverts to the default mode. It is illegal to include Spectre syntax in the SPICE mode or vice versa.

For the MOS instance line given below:

M1 1 2 0 0 NCH W= 10u L= 2u

Spectre displays the following warning:

m1: Encountered statement in Spectre format while in SPICE language mode. This will not be supported in a future release.

Since the instance statement is valid in both languages, you can ignore this warning.

Topology Messages

Notice from spectre during topology check.
Only one connection to the following node:
4
No DC path from node `4' to ground, Gmin installed to provide path.

The Spectre topology checker identifies floating nodes and automatically inserts a gmin resistor (1e12 Ohms) to prevent a non-isolated solution. The Spectre simulator then displays a message telling you what it did.

Model Parameter Values Clamped

Warning from spectre during initial setup.
n: The value of `vj(pb)' at T = 25 C is 50e-03 V, which is too small.
Clamped to 0.1 V.
n: The value of `vj(pb)' at T = 27 C is 41.7617e-03 V, which is too small.
Clamped to 0.1 V.

The Spectre simulator clamps model parameter values to prevent numerical difficulties during simulation. When clamping is completed, Spectre displays a message indicating that it is using clamped values. There is no way to disable these clamps.

Invalid Parameter Warnings

Warning from spectre during circuit read-in.
`pchmod': `tox' is not a valid parameter for `bsim4' models.
`pchmod': `nch' is not a valid parameter for `bsim4' models.

This type of warning is issued any time you specify an invalid parameter in a model definition. The models included with Spectre have predefined model parameters. For more information, see spectre -h.

Only these predefined parameters can be used within a model definition. The Spectre circuit simulator issues similar warnings for invalid instance and subcircuit parameters.

Redefine Primitives Messages

Warning from spectre in `q2' during circuit read-in.
"redefPrim.scs" 6: `q2.resistor' redefines the primitive named `resistor

Spectre displays this message if you define a model or subcircuit with the same name as a built-in primitive device.

The following message tells you that the local definition will override the built-in definition:

model resistor bjt
q1 1 2 3 resistor

q1 is considered a bjt device rather than a resistor.

Initial Condition Messages

Notice from spectre during IC analysis, during transient analysis 'tran1'.
Initial condition computed for node 2 is in error by 755.152 uV. To reduce error in computed initial conditions, decrease `rforce'. However, setting rforce too small may result in convergence difficulties or in
the matrix becoming singular.

The Spectre simulator sets initial conditions on a node by attaching a voltage source through a resistor. The default value of this resistor is 1, but you can control the value through the options parameter rforce. This notice indicates that the initial condition calculated for this node is about 755uV from the value specified in the netlist. You can lower the value of rforce to bring the voltage values into agreement in one of the following ways:

Output Messages

Notice from spectre during transient analysis 'tran1'.
No outputs found. Loosening output filter criterion to 'lvlpub'.

If you set save=selected, the Spectre simulator saves the voltages in the save statement. If the save statement does not contain any voltage values, Spectre issues the above warning and changes the save option default to lvlpub. This saves all node voltages.

Log File Messages

Warning from Spectre during generation of log file.
opt1 options warning_limit=number warning_id = [message_type_1 message_type_2]

For example,

opt1 options warning_limit=3 warning_id = [SFE-30 CMI-2151]

IN the statement, 3 is the number of messages allowed for printing in log file for each message type defined in warning_id.

SFE-30 and CMI-2151 are the user-defined message types for printing in the log file.

Customizing Error and Warning Messages

You can customize the Spectre error and warning messages to some extent to fit the needs of a simulation. This section tells you about these customization options.

Selecting Limits for Parameter Value Warning Messages

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.

Accepting Cadence Range Limits Defaults

The most convenient option for deciding which warning messages you receive is to accept Cadence Range Limits Defaults. The Cadence defaults are located in your_install_dir/tools/spectre/etc/limits/range.lmts, and you can examine them to see if they meet your needs. You can enter Cadence defaults with the SPECTRE_DEFAULTS environment variable in your shell initialization file (such as .profile or .cshrc). The entry in your shell initialization file looks like the following:

setenv SPECTRE_DEFAULTS "+param $HOME/tools/dfII/etc/
spectre/range.lmts"

With this entry in the shell initialization file, the Spectre simulator reads parameter limits from your_install_dir/tools/spectre/etc/limits/range.lmts.

You can override a SPECTRE_DEFAULTS setting with the param option of the spectre command. Specifying +param as a command line argument overrides +param in SPECTRE_DEFAULTS and tells the Spectre simulator to read range limits from the file you specify. Specifying -param tells the Spectre simulator to ignore the +param given in SPECTRE_DEFAULTS without giving the Spectre simulator a new location to find range limits.

For more information about Spectre defaults, see the Spectre Circuit Simulator Reference manual and “Customizing Percent Codes”.

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:

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

Examples of Range Limits Specifications

Examples of Range Limits Specifications (continued)

Example of a Parameter Range Limits File

This example shows a parameter limits file with correct syntax.

mos3      0.5u <= l <= 100u 
          0.5u <= w 
          0 < as <= 1e-8 
          0 < ad <= 1e
model |vto| <= 3

You can find the parameter names (l, w, as, ad, vto) and component keywords (mos3) in the parameter listings in the Spectre online help (spectre -h). This example instructs the Spectre simulator to accept without warnings mos3 components for these conditions:

Entering a Parameter Range Limits File

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

Requesting Breakdown Region Warnings for Transistors

If you want warning messages about the breakdown regions of transistors, you must set the appropriate parameters for each component when you identify the component with an instance or model statement. For most transistors, you set the bvj parameter.

For BJTs, you must set three parameters: bvbe, bvbc, and bvsub. These are breakdown parameters for the base-emitter, the base-collector, and the substrate junctions.

Diodes are also exceptions because you can set both the bvj and bv parameters. You need two different parameters for the diode breakdown voltage because of the Zener breakdown model in the diode. When you use the diode as a Zener diode, it is purposely biased in the breakdown region, and you do not want to be warned about the Zener breakdown. By specifying the bv parameter, you tell the Spectre simulator to implement the Zener diode model at bv.

Telling Spectre to Perform Additional Checks of Parameter Values

You can perform a check analysis at any point in a simulation to be sure that the values of component parameters are reasonable. You can perform checks on input, output, or operating-point parameters. The Spectre simulator checks parameter values against parameter soft limits. To use the check analysis, you must also enter the +param command line argument with the spectre command to specify a file that contains the soft limits.

The following example illustrates the syntax of the check statement. It tells the Spectre simulator to check the parameter values for instance statements.

ParamChk check what=inst

The what parameter of the check statement gives you the following options:

Option Action

none

Disables parameter checking.

models

Checks input parameters for all models only.

inst

Checks input parameters for all instances only.

input

Checks input parameters for all models and all instances.

output

Checks output parameters for all models and all instances.

all

Checks input and output parameters for all models and all instances.

oppoint

Checks operating-point parameters for all models and all instances.

Selecting Limits for Operating Region Warnings

The Spectre simulator lets you specify forbidden operating regions for transistors. If a transistor operates in a forbidden operating region, the Spectre simulator sends you a warning message. This feature is available for BJTs, MOSFETs, JFETs, and GaAs MESFETs.

Specifying Forbidden Operating Regions for Transistors

You specify a forbidden operating region in a transistor with the alarm parameter. The alarm parameter gives you the following options:

Option Description

none

The default condition with no warnings issued.

off

Warns if the transistor is turned off.

triode

Warns if the transistor operates in the triode region (available for MOSFETs).

sat

Warns if the transistor operates in the saturation region.

subth

Warns if the transistor operates in the subthreshold region (available for MOSFETs).

fwd

Warns if the transistor is forward-biased (available for BJTs).

rev

Warns if the transistor is reverse-biased.

For example, to be sure that a group of MOSFETs always operates in the saturation region, you enter this model statement:

model mos_example nmos alarm=off alarm=triode     
      alarm=subth .....

Each of the three alarm parameters in this example identifies a forbidden operating condition. Operating the device anywhere except in the saturation region triggers a warning. The warning looks like the following:

Warning detected by spectre during transient analysis 'timesweep'.
M1: Device operated in the triode region.

Defining BJT Operating Regions

The Spectre simulator provides two parameters, vbefwd and vbcfwd, that let you specify the boundaries between BJT operating regions. The default value for each parameter is 0.2 volts.

The following table shows you the criteria the Spectre simulator uses to determine BJT operating regions.

Region Bias Conditions

off

Vbe <= vbefwd and Vbc <= vbcfwd

saturation

Vbe > vbefwd and Vbc > vbcfwd

forward

Vbe > vbefwd and Vbc <= vbcfwd

reverse

Vbe <= vbefwd and Vbc > vbcfwd

Range Checking on Subcircuit Parameters

You can test the value of subcircuit parameters with the paramtest component. If the parameters meet your testing criteria, you can print an informational message, print a warning, or print an error message and terminate the program.

Formatting the paramtest Component

The paramtest component has the following format:

Name paramtest parameter=value

Rules and Guidelines to Remember

The paramtest Options

The following table explains the possible paramtest options.

Parameter Instruction

printif

Informational message is printed if test condition is satisfied.

warnif

Warning is printed if test condition is satisfied.

errorif

Program quits and error message is printed if testing condition is satisfied.

message

Parameter value is the message text.

severity

You set this parameter when you use paramtest without a test condition. It specifies the type of message printed and the action to be taken, if any. The possible values are debug, status, warning, error, and fatal. If you specify error, the current analysis quits with an error message. If you specify fatal, the whole simulation stops.

A paramtest Example

This example uses three consecutive paramtest statements to check the values of four parameters—l, w, ls, and ld. If a parameter value satisfies a test condition, one of three different warning messages is printed:

TooShort paramtest warnif=(l < 1um) \
message="Channel length for nmos must be greater than 1u."
TooThin paramtest warnif=(w < 1um) \
message="Channel width for nmos must be greater than 1u."
TooNarrow paramtest warnif=(ls < 1um) warnif=(ld < 1um) \
message="Strip width for nmos must be greater than 1u."

Controlling Program-Generated Messages

The Spectre simulator normally sends error, warning, and informational messages to the screen. To prevent confusion, the Spectre simulator limits the amount of material it sends to the screen. You can, however, get a more complete printout of messages if you send the messages to a log file that you can generate with the spectre command or in a SPECTRE_DEFAULTS environment variable.

Specifying Log File Options

You can choose from among the following command line options:

+log <file>

The Spectre simulator sends all messages to a log file as well as printing to the screen. You specify the name for the file. You can use +l as an abbreviation of +log.

=log <file>

The Spectre simulator sends all messages to a log file but does not print to the screen. You specify the name for the file. You can use =l as an abbreviation of =log.

-log

The Spectre simulator does not create a log file. You can use -l as an abbreviation of -log. This is the default option.

Command Line Example

The following entry on the command line runs a simulation for circuit smps.circuit and sends all messages to a log file named smps.logfile:

spectre =log smps.logfile smps.circuit

Setting Environment Variables

If you specify log file options in a SPECTRE_DEFAULTS environment variable, you might want to name log files according to some system that helps you keep track of log files from different simulations. Spectre predefined percent codes are useful for this. The following example uses the predefined percent code %C to create log filenames based on the input filename. If you run a simulation for smps.circuit, the Spectre simulator creates a log file named smps.circuit.logfile. You place the SPECTRE_DEFAULTS environment variable in the .cshrc or .profile files.

setenv SPECTRE_DEFAULTS "=log %C.logfile"

For more information about predefined percent codes and the SPECTRE_DEFAULTS environment variable, see Chapter 13, “Managing Files.”

Suppressing Messages

There are also spectre command options that let you print or suppress error, warning, or informational messages:

+error

Prints error messages

-error

Does not print error messages

+warning

Prints warning messages

-warning

Does not print warning messages

+info

Prints informational messages

-info

Does not print informational messages

As a default, the Spectre simulator prints all these messages.

Correcting Convergence Problems

In this section, you will learn about procedures that can help you if a simulation does not converge.

Correcting DC Convergence Problems

If you have DC convergence problems, these suggestions might help you. Simple solutions generally precede more radical or complex measures in the list.

Correcting Transient Analysis Convergence Problems

You can use two approaches to eliminate transient analysis convergence problems. The first strategy is to reduce the effect of discontinuities in nonlinear capacitors. The second method is to eliminate discontinuous jumps in the solution. Try the following suggestions if you have difficulty with transient analysis convergence:

Correcting Accuracy Problems

If you need greater accuracy from a Spectre simulation, the most common solution is to tighten the reltol parameter of the options or set statements. In addition, be sure that the absolute tolerance parameters, vabstol and iabstol, are set to appropriate values. If tightening reltol does not help or if it greatly slows the simulation, try the additional suggestions in the following sections.

Suggestions for Improving DC Analysis Accuracy

Suggestions for Improving Transient Analysis Accuracy

Packaging a Test Case for Shipment to Cadence

The mmsimpack utility, shipped with the SPECTRE release, enables you to create a compressed tar file containing all input files required for a test case. If a test case needs to be sent to Cadence for discussing and resolving Spectre simulation problems, the utility can be used to create the required file set, and to ship the case to Cadence.

To create a compressed tar file, perform the following steps:

  1. Run a regular Spectre simulation to create a Spectre log file which reports all the files being read during parsing. Since, for this job, only the parsing is of relevance, the transient time may be shorted to accelerate the process.
  2. Use the mmsimpack utility to create the compressed tar file, as follows:
    % mmsimpack logfile -pack <packdir> [-filter <filter_file> ]
    Where
    pack <packdir> specifies the directory where you want to save the packed netlist.
    -filter <filter_file> (Optional) is a user-defined filter. The files that match the pattern in the filter file are not packed. The format of filter_file should be a regular expression.
    -copy_only (Optional) Copy only the input netlist files and do not replace the absolute path in the netlist. This can reduce the mmsimpack runtime, however, the netlist might not run at another location because of the path issue.
    -h displays the help information.

Example

% spectre +aps mult16.scs +log mult16.out
% mmsimpack mult16.out -pack packngo

The above example will create a file called SendMe.tar.gz in the directory packngo. The SendMe.tar.gz file contains all the files required for running Spectre on the mult16.scs test case.


Return to top
 ⠀
X