Product Documentation
Spectre Circuit Simulator Measurement Description Language User Guide and Reference
Product Version 23.1, June 2023

B


SPICE Compatibility for Analyses

MDL supports the SPICE .tran, .ac, .dc, and .op analyses as described below.

  1. MDL supports SPICE .tran, .ac, .dc, and .op analyses defined in the netlist.
  2. Each .tran, .ac, .dc, or .op is mapped to a Spectre tran, ac, dc, or op analysis. Multiple SPICE analyses per analysis type are supported as well. Here is a list of Spectre mapped names:
    Spectre Mapped Name
    SPICE Analysis Type First Run Name Subsequent Run Names

    .TRAN

    timeSweep

    tran2, tran3, …,trann

    .AC

    frequencySweep

    ac2, ac3, …, acn

    .DC

    srcSweep

    dc2, dc3, …, dcn

    .OP

    opBegin

    op2, op3, …, opn


    Therefore, the following statements are necessary in an MDL control file when running MDL on a netlist in SPICE format:
    run opBegin          // runs first defined .OP analysis
    run op2           // runs second defined .OP analysis
    run srcSweep     // runs first defined .DC sweep analysis
    run dc2           // runs second defined .DC sweep analysis
    run frequencySweep     // runs first defined .AC analysis
    run ac2           // runs second defined .AC analysis
    run timeSweep     // runs first defined .TRAN analysis
    run tran2     // runs second defined .TRAN analysis
  3. When running MDL, the SPICE .measure/.probe/.print statements defined in the netlist are ignored. In other words, the MDL control file supersedes the SPICE .measure/.probe/.print statements defined in the netlist. However, if running Spectre but not MDL (for instance, using command line spectre spice.ckt), the .measure/.probe/.print statements defined in the netlist supersede the spice .mdl control file.
  4. The analyses can be parameterized in the MDL control file without modifying the netlist (see Example 2).
  5. Mixed syntax netlists (containing both Spice and Spectre syntax analyses statements) are also supported in MDL (see Example 3).
  6. Multi-level sweeps of .tran/.dc/.ac are not supported in MDL. For example, the following SPICE .ac statement is not supported.
    .ac dec 20 1k 100k SWEEP V1 1 3 2
    You can use MDL foreach statement to sweep V1:mag and run AC analysis inside the alias measurement (see Example 4). If you want to do a DC sweep, you need to sweep V1:dc and run a DC analysis.

Example 1

For the SPICE analyses below:

*in Netlist

.TRAN 1ns 5us
.TRAN 1ns 10us START=8us
.ac dec 10 1 10M
.ac dec 10 100M 1G

The equivalent MDL statements are:

//in MDL control file

run timeSweep     // runs first .tran with stop time of 5us
run tran2 (start=8us)     // runs second .tran with stop time of 10us
run frequencySweep     // runs first .ac sweeping from 1Hz to 10MHz
run ac2     // runs second .ac sweeping from 100MHz to 1GMHz

Example 2

The following example shows how to set a new value for the parameters of built-in analyses without modifying the netlist:

For the following SPICE analysis:

*in Netlist

.TRAN 1ns 5us

The following statement tells the simulator to run transient analysis with the new stop time 100us:

//----in MDL control file -----

run timeSweep(stop=100u)       // set stop time to new value 100us

Example 3

For mixed syntax statements like the following:

*in Netlist     

.op
.dc V1 0 1 0.1
simulator lang=spectre
mytran tran stop=1ms

The equivalent MDL statements are:

//in MDL control file

run opBegin       // runs .op pre-defined in SPICE syntax
run srcSweep      // runs .dc pre-defined in SPICE syntax
run mytran        // runs tran analysis pre-defined in SPECTRE syntax

Example 4

To implement the following SPICE-like sweeps:

.ac dec 20 1k 100k SWEEP V1 1 3 2

You can use the following statements:

*in Netlist

.ac dec 20 1k 100k

//in MDL control file

alias measurement acmeas {
run freqencySweep
<export variable block>
}
foreach V1:dc from swp (start=1, stop=3, step=2) {
run acmeas
}

Return to top
 ⠀
X