-- FILE: Mark.mesa
-- Last edited by Ousterhout, August 9, 1983 1:55 pm

-- This file defines several routines used by Crystal to mark
-- node characteristics such as inputs, outputs, and fixed values.

DIRECTORY
    Globals,
    Rope;

Mark: CEDAR DEFINITIONS =
BEGIN
OPEN Globals;

InputCmd: CmdProc;
    -- Processes the "input" command.  Each argument is the name
    -- of a node to be marked as an input.
    
OutputCmd: CmdProc;
    -- Processes the "output" command.  Each argument is the name
    -- of a node to be marked as an output.

BusCmd: CmdProc;
    -- Processes the "bus" command.  Each argument is the name
    -- of a node to be marked as a bus (meaning it is highly
    -- capacitive).

PrechargedCmd: CmdProc;
    -- Processes the "precharged" command.  Each argument is the
    -- name of a node to be marked as precharged.

WatchCmd: CmdProc;
    -- Processes the "watch" command.  Each argument is the name
    -- of a node to be marked as watched (watched nodes have their
    -- worst-case delays recorded in a separate list).

ResCmd: CmdProc;
    -- First argument gives resistance value.  Each successive
    -- argument is a node name, whose internal resistance is
    -- changed to the given value.
    
CapCmd: CmdProc;
    -- First argument gives capacitance value.  Each successive
    -- argument is a node name, whose internal resistance is
    -- changed to the given value.

SetNodeValue: PROC[node: Node, value: INT, propAnyway: BOOLEAN ← FALSE];
    -- Forces node to have the given value, and uses a simple logic
    -- simulator to propagate that information through the circuit as
    -- much as possible.  If propAnyway is TRUE, then the simulation
    -- is invoked even if the node already had this value.

SetCmd: CmdProc;
    -- First argument gives 0/1 value.  Each successive
    -- argument is a node name.  Each of the nodes is set
    -- to the given value.

MarkDynamic: PROC[];
    -- This command sets the dynamic flags in all nodes that aren't
    -- input nodes, aren't forced to a particular value, and for which
    -- all connected transistors are turned off.

Stats: PROC[];
    -- Prints out various statistics gathered during simulation.

SeeSettings: BOOLEAN;
    -- TRUE means nodes with character names (as opposed to numeric)
    -- are printed out whenever there values become fixed during simulation.

SeeAllSettings: BOOLEAN;
    -- Like SeeSettings, except ALL nodes get printed, independent of name.
    
SeeDynamic: BOOLEAN;
    -- TRUE means node names get printed out automatically for each node
    -- discovered to be a dynamic memory node during the "markdynamic"
    -- command.
END.