[Indigo]<Rosemary>2.6>Rosemary.DF=>SwitchTypes.Mesa
Last Edited by: Spreitzer, January 25, 1985 4:08:07 pm PST
DIRECTORY Basics, RoseTypes;
SwitchTypes: CEDAR DEFINITIONS =
BEGIN OPEN RoseTypes;
bitType: NodeType;
Bundle: PROC [bits: CARDINAL] RETURNS [NodeType];
IsSwitchType: PROC [NodeType] RETURNS [BOOLEAN];
SwitchVal:
TYPE =
MACHINE
DEPENDENT
RECORD [
s: PACKED ARRAY StrengthIndex OF Strength ← ALL[none],
val: Level ← X,
pad: [0 .. 4) ← 0];
StrengthIndex: TYPE = {q, u, d};
Strength: TYPE = {none, chargeWeak, charge, chargeStrong, driveWeak, drive, driveStrong, input};
Level:
TYPE = {
L,
H,
X};
X means completely unknown level (as opposed to meaning something between low and high).
refInput, refDriveStrong, refDrive, refDriveWeak, refChargeStrong, refCharge, refChargeWeak, refNone: REF Strength;
switchValsPerWord:
INTEGER = 480/
SIZE[
PACKED
ARRAY [0 .. 480)
OF SwitchVal];
480 is LCM [Floor[32/1], Floor[32/2], Floor[32/3], ... Floor[32/32]].
bitsPerSwitchVal: INTEGER = 16;
bitsPerSwitchValFiller: INTEGER = Basics.bitsPerWord - bitsPerSwitchVal;
wordsPerSwitchValPort: INTEGER = (bitsPerSwitchVal + bitsPerSwitchValFiller) / Basics.bitsPerWord;
SwitchValHolder:
TYPE =
MACHINE
DEPENDENT
RECORD [
fill(0:0..bitsPerSwitchValFiller-1): SwitchValFiller,
held(0:Basics.bitsPerWord-bitsPerSwitchVal..Basics.bitsPerWord-1): SwitchVal];
SwitchValFiller: TYPE = [0..TwoToThe[bitsPerSwitchValFiller]);
Block: PROC [a, b: Strength] RETURNS [c: Strength];
SetCapacitance: PROC [n: Node, cap: REAL];
GetCapacitance: PROC [n: Node] RETURNS [cap: REAL];
SetSizes: PROC [n: Node, currentSize, normalSize: Strength];
GetSizes: PROC [n: Node] RETURNS [currentSize, normalSize: Strength];
END.