Next: , Previous: View Commands, Up: Commands



3.7 modes Commands

This section lists commands that affect the execution of the simulation.

— Command: checkexcl
— Command: nocheckexcl

Enables mutual exclusion checking for checked exclusive node rings. Checking is enabled by default. Users of old prsim should replace uses of CHECK_CHANNELS with these commands.

— Command: eval-order [mode]

With no argument, reports the current evaluation ordering mode. With mode (either inorder or random), fanouts are evaluated either in a pre-determined order, or in random order. Random ordering is useful for emulating random arbitration among fanouts of the same node. Default mode is inorder.

Timing mode.

— Command: timing [mode] ...

Modes: uniform delay applies the same delay to all rules. uniform is useful for getting quick transition counts. random gives every event a different randomly assigned delay. random is most useful for detecting non-QDI logic violations. after applies a different delay for each rule, as determined by the after PRS rule attribute.

The after_min and after_max rule attributes only have any effect in random mode or on nodes marked always_random. In random-mode, after_min specifies a lower bound on delay, and after_max specifies an upper bound on delay. When no upper bound is specified, the delay distribution is an exponential variate; when an upper bound is specified, a delay is generated with uniform distribution between the bounds. If only a lower bound is specified, its value is added to the exponentially distribtued random delay.

In the future, we may consider distributions that favor the bounds, (e.g. 50% chance of min or max) to stress the limits of the specified delays in testing and timing closure.

— Command: random

Deprecated, but retained for legacy compatibility. Synonymous with timing random.

— Command: norandom

Deprecated, but retained for legacy compatibility. Synonymous with timing uniform.

— Command: seed48 [int int int]

Corresponds to libc's seed48 function. With no argument, print the current values of the internal random number seed. With three (unsigned short) integers, sets the random number seed. Note: the seed is automatically saved and restored in checkpoints. The seed value is reset to 0 0 0 with the reset command, but not with the initialize command.

The simulator now supports weak rules which can drive un-pulled nodes but always yield to normal rules. Weak rules are marked with the [weak=1] production rule attribute. The use of weak-rules can be globally enabled or disabled.

— Command: weak-rules [on|off|show|hide]

Simulation mode switch which globally enables or disables (ignores) weak-rules. Weak-rules can only take effect when normal rules pulling a node are off. The hide and show options control whether or not weak rules are displayed in rule queries, such as fanin, fanout, and rules.

Diagnostic controls. The following commands control the simulation policy for run-time logic violations. Allowed arguments are: ignore, warn, notify, and break. ignore silently ignores violations. notify is the same as warn, which prints a diagnostic message without interrupting the simulation. break reports an error and stops the simulation. When no argument is given, just reports the current policy.

— Command: unstable [mode]

Set the simulator policy in the event of an instability. A rule is unstable when it is enqueued to fire, but a change in the input literal/expression stops the rule from firing. Stability is a requirement of quasi-delay insensitive circuits. Default mode is break.

— Command: weak-unstable [mode]

Set the simulator policy in the event of a weak-instability. A rule is weakly-unstable when it is enqueued to fire, but a change in the input literal (to unknown) may stop the rule from firing. Default mode is warn.

— Command: interference [mode]

Set the simulator policy in the event of interference. A rule is interfering when it is fighting an opposing (up/down) firing rule. Interference will always put the conflicting node into an unknown state. Non-interference is a requirement of quasi-delay insensitive circuits. Default mode is break.

— Command: weak-interference [mode]

Set the simulator policy in the event of weak-interference. A rule is weakly interfering when may fight an opposing (up/down) firing rule. Weak-interference will put the conflicting node into an unknown state. Default mode is warn.

— Command: invariant-fail [mode]

Set the error-handling policy for certain invariant violations, when an invariant expression evaluates to false.

— Command: invariant-unknown [mode]

Set the error-handling policy for possible invariant violations, i.e. when an invariant expression evaluates to X.

— Command: assert-fail [mode]

Set the error-handling policy for when the assert command fails.

— Command: channel-expect-fail [mode]

Set the error-handling policy for when the a channel encounters a value different from was expected.

— Command: checkexcl-fail [mode]

Set the error-handling policy for when an exclusion check fails.

— Command: mode [md]

Without arguments, reports the current simulation policies on logic violations. With argument md, run is the default set of policies, reset is only different in that weak-unstable is ignored. reset is useful during the initalization phase, when some rules may transiently and weakly interfere, as they come out of unknown state. paranoid causes the simulation to break on weak-instabilities and weak-interferences, which is useful for debugging.

Two additional commands control the behavior of unstable rules. These are particularly useful for simulating circuits that expect to glitch, such as synchronous (clocked) circuits.

— Command: unstable-unknown

When set, this causes unstable rules to be result in an unknown value on the output node. The opposite effect is the unstable-dequeue command.

— Command: unstable-dequeue

When set, this causes unstable rules to be dequeued from the event queue. The opposite effect is the unstable-unknown command. This option also allows events that drive a node to 'X' in the queue to be overtaken and replaced with known values if the fanin pull of the node is resolved to a non-interfering direction before the 'X' event on the node is dequeued.