next up previous contents index
Next: Random Numbers Up: System Tasks Previous: Input/Output Tasks   Contents   Index

Simulation Control

$bound_step(max_delta)
Limit the next time point to be max_delta or less from the present time point in transient analysis.

$finish[(n[, type_string])]
Halt the analysis. If integer n is given, it can be one of these values, which determine what if anything is printed.

From the spec, this is not currently supported.

0 Prints nothing (the default if no argument)
1 Prints simulation time and location
2 Prints simulation time, location, and statistics about the memory and CPU time used in simulation

Verilog-AMS allows an additional option string argument to be specified to $finish to indicate the type of the finish. type_string can take one of three values: ``accepted'', ``immediate'' or ``current_analysis''. ``accepted is the default setting.

If the type_string is set to ``accepted'' and $finish is called during an accepted iteration, then the simulator will exit after the current solution is complete.

If the type_string is set to ``current_analysis'' and $finish is called during an accepted iteration, then the simulator terminates the current analysis and will start the next analysis if one requested.

If the type_string is set to ``immediate'' and $finish is called during an iteration, then the simulation will exit immediately without the current solution being completed. This is not recommended as it may leave the output files generated by the simulator in an undefined state.

$stop[(n)]
A call to $stop during an accepted iteration causes simulation to be suspended at a converged timepoint. This task takes an optional integer expression argument (0, 1, or 2), which determines what type of diagnostic message is printed. The amount of diagnostic message output increases with the value of n, as shown for $finish.


next up previous contents index
Next: Random Numbers Up: System Tasks Previous: Input/Output Tasks   Contents   Index
Stephen R. Whiteley 2022-09-18