Instantiation and Relaxation
SetFixedWire:
PROC [wire: Core.Wire, level: Level ← L]
RETURNS [sameWire: Core.Wire];
Sets the value of the wire and indicates that the value of the wire may not be changed by Rosemary. This is only intended to be used for atomic public wires of the root cell type such as Vdd and Gnd. These wires partition the network into disjoint blocks connected through transistor gates. It is not a general purpose mechanism for jamming a value onto a wire.
SetNamedFixedWire:
PROC [cellType: Core.CellType, name: Rope.
ROPE, level: Level ← L]
RETURNS [sameWire: Core.Wire];
Same as SetFixedWire but uses name as the full name in the public of cellType.
Instantiate:
PROC [cellType: Core.CellType]
RETURNS [simulation: RoseSimulation];
Initialize:
PROC [simulation: RoseSimulation];
Settle:
PROC [simulation: RoseSimulation];
Data Structures
Level: TYPE = {L, H, X};
levelNames:
ARRAY Level
OF Rope.
ROPE;
Drive:
TYPE = {
inspect, -- allows test port to receive value
expect, -- allows test port to specify expected value
none,
--in a test port it means neither driven nor checked; in an eval port it means no strength at all
chargeWeak, chargeMediumWeak,
charge,
chargeMediumStrong, chargeStrong,
force,
-- weakest drive level, allows test procs to check if device has tristated
driveWeak, driveMediumWeak,
drive,
driveMediumStrong, driveStrong,
infinite -- drive for nodes which have infinite current sources
};
driveNames:
ARRAY Drive
OF Rope.
ROPE;
WireSize:
TYPE = Drive[chargeWeak..chargeStrong];
RoseSimulation: TYPE = REF RoseSimulationRec;
RoseSimulationRec:
PUBLIC
TYPE =
RECORD [
cellType: Core.CellType ← NIL,
coreToRoseWires: RefTab.Ref ← NIL,
perturbed: RoseWire ← NIL,
vicinityByStrength: ARRAY Drive OF VicinityRec,
settle: INT ← 0,
step: INT ← 0];
VicinityRec:
TYPE =
RECORD[
wires: RoseWires,
firstFree: CARDINAL ← 0];
RoseWires: TYPE = REF RoseWireSeq;
RoseWireSeq: TYPE = RECORD [s: SEQUENCE size: CARDINAL OF RoseWire];
RoseWire: TYPE = REF RoseWireRec;
RoseWireRec:
TYPE =
RECORD [
nextPerturbedWire: RoseWire ← NIL,
previousPerturbedWire: RoseWire ← NIL,
nextRecomputed: RoseWire ← NIL,
nextVicinityWire: RoseWire ← NIL,
probes: RoseProbePrimitives ← NIL,
channels: RoseTransistors ← NIL,
notOffChannels: RoseTransistors ← NIL,
gates: RoseTransistors ← NIL,
switchDrive: Drive ← none,
upDrive: Drive ← none,
downDrive: Drive ← none,
wireSize: Drive ← charge,
wireLevel: Level ← X,
mark: BOOL ← FALSE,
flatWire: CoreFlat.FlatWireRec];
RoseTransistors: TYPE = LIST OF RoseTransistor;
RoseTransistor: TYPE = REF RoseTransistorRec;
RoseTransistorRec:
TYPE =
RECORD [
gate: RoseWire ← NIL,
ch1: RoseWire ← NIL,
ch2: RoseWire ← NIL,
conductivity: Drive ← drive,
transistorType: CoreClasses.TransistorType ← nE,
flatCellType: CoreFlat.FlatCellTypeRec];
RoseProbe: TYPE = REF RoseProbeRec;
RoseProbeRec:
TYPE =
RECORD [
simulation: RoseSimulation ← NIL,
s: SEQUENCE size: CARDINAL OF RoseProbePrimitive];
RoseProbePrimitives: TYPE = LIST OF RoseProbePrimitive;
RoseProbePrimitive: TYPE = REF RoseProbePrimitiveRec;
RoseProbePrimitiveRec:
TYPE =
RECORD [
level: Level ← X,
drive: Drive ← none,
wire: RoseWire ← NIL];