System simulation control tasks

LRM §14.4.

System simulation control tasks control the simulation.

Syntax:

$finish [ (n) ];
$stop [ (n) ]

n = 0 | 1 | 2

Description:

$finish finishes a simulation and exits the simulation process. If an argument is supplied, diagnostic messages are printed as follows:

  1. prints nothing
  2. prints simulation time and location
  3. prints simulation time, location and statistics about the used memory and CPU time

$stop suspends the simulation. The argument determines the type of diagnostic messages produced. 0 gives the least amount, 2 gives the most amount of output.

Example:

$finish(2);
$stop;