B
SPICE Compatibility for Analyses
MDL supports the SPICE .tran, .ac, .dc, and .op analyses as described below.
-
MDL supports SPICE
.tran,.ac,.dc, and.opanalyses defined in the netlist. -
Each
.tran,.ac,.dc, or.opis mapped to a Spectretran,ac,dc, oropanalysis. 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
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
-
When running MDL, the SPICE
.measure/.probe/.printstatements defined in the netlist are ignored. In other words, the MDL control file supersedes the SPICE.measure/.probe/.printstatements defined in the netlist. However, if running Spectre but not MDL (for instance, using command linespectre spice.ckt), the.measure/.probe/.printstatements defined in the netlist supersede the spice.mdlcontrol file. - The analyses can be parameterized in the MDL control file without modifying the netlist (see Example 2).
- Mixed syntax netlists (containing both Spice and Spectre syntax analyses statements) are also supported in MDL (see Example 3).
-
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 MDLforeachstatement 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 sweepV1:dcand run a DC analysis.
Example 1
.TRAN 1ns 5us
.TRAN 1ns 10us START=8us
.ac dec 10 1 10M
.ac dec 10 100M 1G
The equivalent MDL statements are:
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:
.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:
.op
.dc V1 0 1 0.1
simulator lang=spectre
mytran tran stop=1ms
The equivalent MDL statements are:
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:
.ac dec 20 1k 100k
alias measurement acmeas {
run freqencySweep
<export variable block>
}
foreach V1:dc from swp (start=1, stop=3, step=2) {
run acmeas
}
Return to top