$simparam(string[, expression])
This
queries the simulator for a simulation parameter named in string. If string is known, its value is returned. If
string is not known, and the optional expression is not
supplied, then an error is generated. If the optional expression is supplied, its value is returned if string is not
known and no error is generated.
$simparam() shall always return a real value; simulation
parameters that have integer values shall be coerced to real. There
is no fixed list of simulation parameters. However, simulators shall
accept the strings below to access commonly-known simulation
parameters, if they support the parameter. Simulators can also accept
other strings to access the same parameters.
The first group below comes from the Verilog-AMS specification.
- gdev
Additional conductance to be added to nonlinear branches for
conductance homotopy convergence algorithm. Returns the WRspice
gmin parameter.
- gmin
Minimum conductance placed in parallel with nonlinear branches,
returns the WRspice gmin parameter.
- imax
Branch current threshold above which the constitutive relation
of a nonlinear branch should be linearized. Returns 1.0.
- imelt
Branch current threshold indicating device failure. Returns 1.0.
- iteration
Iteration number of the analog solver, returns an internal iteration
count.
- scale
Scale factor for device instance geometry parameters. Returns 1.0.
- shrink
Optical linear shrink factor. Returns 1.0.
- simulatorSubversion
The simulator sub-version. Returns, e.g., 5 for WRspice-4.3.5.
- simulatorVersion
The simulator version. Retursn, e.g., 4.3 for WRspice-4.3.5.
- sourceScaleFactor
Multiplicative factor for independent sources for source stepping
homotopy convergence algorithm. WRspice returns the scaling value
from source stepping.
- tnom
Default value of temperature in Celsius at which model parameters were
extracted (same as $nominal_temperature>).
The following group has unknown origin.
- checkjcap
Returns 1.0.
- maxmosl
Returns 1.0.
- maxmosw
Returns 1.0.
- minmosl
Returns 1.0e-12.
- minmosw
Returns 1.0e-12.
The final group is implemented in WRspice, perhaps uniquely.
- tstep
The current transient analysis output time increment.
- tstart
The current start time for transient analysis output.
- tstop
The current final time point in transient analysis.
- delta
The current internal time step in transient analysis.
- delmin
The minimum allowable transient analysis time step.
- delmax
The maximum allowable transient analysis time step.
- abstol
The absolute tolerance parameter.
- reltol
The relative tolerance parameter.
- chgtol
The charge tolerance parameter.
- vntol
The voltage tolerance parameter.
- predictor
Nonzero when in the first iteration of a time point.
- smallsig
Nonzero when loading small-signal values in AC analysis.
- dcphasemode
Nonzero if using phase-mode DC analysis, may be true when Josephson
junctions are present.
- dphimax
Returns the maximum phase change for internal time point for
sinusoidal sources and Josephson junctions.