Next: , Previous: Channel Commands, Up: Commands


3.5 info Commands

The first subset of commands give information about the properties of the simulated production rules and contain no stateful information.

— Command: attributes node

Prints the list of attributes attached to the named node.

— Command: fanin node

Print all production rules that can fire NODE.

— Command: fanin-get node

Print all production rules that can fire NODE. Also prints current values of all expression literals as 'node:val' and subexpressions as '(expr)<val>'.

— Command: fanout node

Print all production rules that NODE participates in.

— Command: fanout-get node

Print all production rules that NODE participates in. Also prints current values of all expression literals as 'node:val' and subexpressions as '(expr)<val>'.

— Command: feedback node
— Command: feedback-get node

Print all nodes that NODE drives and is also driven-by. The takes the intersection of fanout nodes and fanin nodes. The -get variant also prints the current node values.

— Command: rules proc
— Command: rules-verbose proc

Print all rules belonging to the named process proc. '.' can be used to refer to the top-level process. The -verbose variant prints the state of each node and expression appearing in each rule.

— Command: allrules
— Command: allrules-verbose

Print all rules in the simulator, similar to hflat. The -verbose variant prints the state of each node and expression appearing in each rule.

— Command: rings-mk node
— Command: rings-mk-get node

Print forced exclusive high/low rings of which node is a member.

— Command: allrings-mk
— Command: allrings-mk-get

Print all forced exclusive high/low rings.

— Command: rings-chk node
— Command: rings-chk-get node

Print all checked exclusive rings of which node is a member.

— Command: allrings-chk
— Command: allrings-chk-get

Print all checked exclusive rings of nodes.

— Command: what name

Print the type of the instance named name.

— Command: who name
— Command: who-newline name

Print all equivalent aliases of instance name. The -newline variant separates names by line instead of spaces for improved readability.

— Command: ls name

List immediate subinstances of the instance named name.

The following commands give information about the state of the simulator and the simulated production rules. The assert-* commands exit with fatal error if the specified condition of a given node is not true. The no-* commands exit with fatal error if there exist any nodes that match the specified criteria. (Currently, the no-* commands do not honor the assert-fail diagnostic overrides; errors are always treated as fatal.)

— Command: get node

Print the current value of node.

— Command: getports struct
— Command: getinports struct
— Command: getoutports struct

Print the state of all port nodes of struct. Useful for observing boundaries of channels and processes. getinports and getoutports partition the set of ports into inputs and outputs. Directionality of inputs/outputs is inferred by the presence of fanin local to the struct process instance (its type).

— Command: getcommonports struct1 struct2

Prints the state of nodes that are common to struct1 and struct2.

— Command: getlocal struct

Print the state of all publicly reachable subnodes of struct. Recursive search does not visit private subnodes. Useful for observing channels and processes.

— Command: getall struct

Print the state of all subnodes of struct. Useful for observing channels and processes.

— Command: assert node value

Error out if node is not at value value. The error-handling policy can actually be determined by the assert-fail command. By default, such errors are fatal and cause the simulator to terminate upon first error.

— Command: assertn node value

Error out if node is at value value. Error handling policy can be set by the assert-fail command. By default such errors are fatal.

— Command: assert-pending node

Error out if node does not have a pending event in queue. The error handling policy is determined by the assert-fail command. By default, such assertion failures are fatal.

— Command: assert-pending node

Error out if node does have a pending event in queue. The error handling policy is determined by the assert-fail command. By default, such assertion failures are fatal.

— Command: assert node value

Error out if node is driven with strength value. The error-handling policy can actually be determined by the assert-fail command. By default, such errors are fatal and cause the simulator to terminate upon first error.

— Command: queue

Print the event queue.

— Command: assert-queue

Error out if event queue is empty. Useful for checking for deadlock. The error handling policy is determined by the assert-fail command. By default, such assertion failures are fatal.

— Command: assertn-queue

Error out if event queue is not empty. Useful for checking for checking result of cycle. The error handling policy is determined by the assert-fail command. By default, such assertion failures are fatal.

— Command: tcount node

tcount shows the number of non-X transitions that have ever occurred on node.

— Command: check-invariants

Checks every invariant expression in the design. Returns true if there were any certain violations, excluding possible violations of invariants.

— Command: backtrace node [val]

Trace backwards through a history of last-arriving transitions on node node, until a cycle is found. If val is omitted, the current value of the node is assumed. Useful for tracking down causes of instabilities, and identifying critical paths and cycle times.

— Command: why-x node
— Command: why-x-verbose node
— Command: why-x-1 node
— Command: why-x-1-verbose node
— Command: why-x-N node maxdepth
— Command: why-x-N-verbose node maxdepth

Print causality chain for why a particular node (at value X) remains X. In expressions, X nodes that are masked out (e.g. 1 | X or 0 & X) are not followed. The verbose variant prints more information about the subexpressions visited (whether conjunctive or disjunctive), and pretty prints in tree-indent form. Recursion terminates on cycles and already-visited nodes. The -1 variant only queries through depth 1, and the -N variant queries to a maximum depth of maxdepth.

— Command: why node [val]
— Command: why-verbose node [val]
— Command: why-1 node [val]
— Command: why-1-verbose node [val]
— Command: why-N node maxdepth [val]
— Command: why-N-verbose node maxdepth [val]

Print reason for node being driven to a given value, 0 or 1. X is not a valid value for this procedure. If val is not given, it is assumed to be the current value of the node. The algorithm examines each node's fanins and follows nodes on paths where the subexpression is true (path through transistors is on). The analysis will terminate at state-holding nodes that are not being driven to their current value. This is an excellent aid in debugging unexpected values. The verbose variant prints expression types as it auto-indents, which is more informative but may appear more cluttered. The -1 variant only queries through depth 1, and the -N variant queries to a maximum depth of maxdepth.

— Command: why-not node [val]
— Command: why-not-verbose node [val]
— Command: why-not-1 node [val]
— Command: why-not-1-verbose node [val]
— Command: why-not-N node maxdepth [val]
— Command: why-not-N-verbose node maxdepth [val]

Print reason for node not being a given value, 0 or 1. X is not a valid value for this procedure. If val is not given, it is assumed to be opposite of the current value of the node. "Why isn't this node changing?" The algorithm examines each node's fanins and follows nodes that prevent the relevant expression from evaluating true. This is an excellent tool for debugging deadlocks. The verbose variant prints expression types as it auto-indents, which is more informative but may appear more cluttered. The -1 variant only queries through depth 1, and the -N variant queries to a maximum depth of maxdepth.

— Command: status value [proc]
— Command: status-newline value [proc]

Print all nodes whose current value is value. Frequently used to find nodes that are in an unknown ('X') state. Valid value arguments are [0fF] for logic-low, [1tT] for logic-high, [xXuU] for unknown value. If proc is given, then restrict the scope of search to only subnodes of that structure. The -newline variant prints each node on a separate line for readability.

— Command: no-status val

Asserts that there are no nodes at value val.

— Command: get-driven node

Reports the drive state of pull-up/dn on a node. See also fanin-get for details.

— Command: status-interference
— Command: status-weak-interference

Print all nodes that have strongly interfering fanins, i.e. the pull-up and pull-downs are on and causing shorts. status-weak-interfere reports possible interferences where at least one direction is being pulled X (unknown). This command is useful for checking the safety of a particular state or snapshot of your circuit.

— Command: no-status-interference
— Command: no-status-weak-interference

Asserts that there are no nodes with interfering (or weak-interfering) fanins.

— Command: status-driven val
— Command: status-driven-fanin val
— Command: no-status-driven val
— Command: no-status-driven-fanin val

Reports all nodes that are in a particular drive-state. The drive-state of a node is the strongest pull in any direction. The current value of the node is not considered. val is 0 for undriven nodes, X for X-driven nodes, and 1 for driven nodes (which may include interfering nodes). The status-driven-fanin variant filters out nodes with no fanin (inputs), which are always undriven. The no- command variants assert that there are no nodes that match the specified drive state. For example, no-status-driven-fanin 0 asserts that no nodes with fanins are floating or in the high impedance state.

— Command: status-frozen
— Command: status-frozen-get

Print all nodes that have been frozen (switching suppressed).

— Command: time

What time is it (in the simulator)?

— Command: unused-nodes
— Command: unused-nodes-get

Print all nodes with no fanins and no fanouts, regardless of state.

— Command: no-unused-nodes

Assert that there are no unused nodes (those without fanout). This is mostly useful for checking closed systems that do not required interaction with any environment.

— Command: unknown-inputs

Print all nodes with value X that have no fanins, i.e. input-only nodes. Connections to channel sinks or sources can count as inputs (fake fanin). Great for debugging forgotten environment inputs and connections! This variant includes X-nodes with no fanouts (unused nodes).

— Command: unknown-inputs-fanout

Print all nodes with value X that have no fanins, i.e. input-only nodes. This variant excludes X-nodes with no fanouts (unused nodes).

— Command: no-unknown-inputs

Assert that there are no inputs nodes at X.

— Command: no-unknown-inputs-fanout

Assert that there are no inputs nodes with fanout at X.

— Command: unknown-outputs

Print all nodes with value X that have no fanouts, i.e. output-only nodes. Connections to channel sinks and sources can counts as outputs (fake fanout). This will not catch output nodes that are fed back into circuits. This variant excludes X-nodes with no fanouts (unused nodes).

— Command: no-unknown-outputs

Assert that there are no outputs nodes at X.

— Command: unknown-fanout

Print all nodes with value X that have fanouts. Connections to channel sinks and sources can counts as outputs (fake fanout).

— Command: no-unknown-fanout

Assert that there are no nodes with fanout at X.

— Command: unknown-undriven-fanin

Print all nodes with value X that have fanins, but are not being pulled. These nodes are typically candidates for adding resets to fix.

— Command: no-unknown-undriven-fanin

Assert that there are no nodes at X with fanins and are being undriven.

— Command: exceptions

Prints the information recorded in recently occurred exceptions. The simulators exception list is cleared each time simulation is advanced by any number of steps. This command is most useful immediately after halting on exceptions. This is not fully implemented yet: exceptions are not saved in checkpoints yet. Noted as ACX-PR-6641.