Info Commands - HACKT PRSIM Manual
Description: HACKT PRSIM Manual

Next: View Commands, 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: 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

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

— Command: allrings-mk

> Print all forced exclusive high/low rings.

— Command: rings-chk node

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

— Command: allrings-chk

> 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.

— Command: get node

> Print the current value of node.

— Command: getports struct

> Print the state of all port nodes of struct. Useful for observing boundaries of channels and processes.

— 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: 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: 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
— Command: status-newline value

> 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. The -newline variant prints each node on a separate line for readability.

— 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: time

> What time is it (in the simulator)?

— Command: unused-nodes

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

— 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: 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: unknown-fanout

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

— 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.