SoftHdwBasics.mesa
Copyright Ó 1988 by Xerox Corporation. All rights reserved.
Barth, June 28, 1989 12:35:34 pm PDT
DIRECTORY DABasics, RefTab, Rope, SunRPC, SunRPCAuth;
SoftHdwBasics: CEDAR DEFINITIONS = BEGIN
ArrayPositions: TYPE = LIST OF ArrayPosition;
ArrayPosition: TYPE = REF ArrayPositionRec;
ArrayPositionRec: TYPE = RECORD [
type: NodeType ← OToP,
orientation: Orientation ← Vertical,
chip: Position ← [0, 0],
minorArray: Position ← [0, 0],
grain: Position ← [0, 0]];
NodeType: TYPE = {OToP, RDToP, LUToP, LToP, PToI, PToRD, PToLU, PToL, ORDToI, LUToLU, OLUToI, ORDToL, Tristate, RDToRD, ORDToLU, LUToI, OLUToRD, LToI, RDToI, Inverter, FlipFlop, ParallelInput, InputEnabled, RAMEven, RAMOdd, Master, Input, Interchip, Long, Output, LeftUp, RightDown};
nodeNames: ARRAY NodeType OF Rope.ROPE;
Orientation: TYPE = {Vertical, Horizontal};
orientationNames: ARRAY Orientation OF Rope.ROPE;
Position: TYPE = DABasics.Position;
Interchip, Long, Output, LeftUp, and RightDown are not accessible through Fetch and Store in the actual hardware and they are not state bits in the hardware. Input is the slave of Master and is accessible when FlipFlopEnabled is asserted, otherwise it also is not a state bit and is not accessible.
interchip and all of the edge tiles belong to the minor array or chip to the left or up. The pin tiles belong to the chip up or down, or left or right, depending on the proper low order bit of minorArray. The orientation of inputEnabled refers to the orientation of the output to which the input is connected.
Interchip, Long
vertical: chip, minorArray.x, grain.x
horizontal: chip, minorArray.y, grain.y
OToP, RDToP, LUToP, LToP, PToI, PToRD, PToLU, PToL
vertical: chip, minorArray.x, low order bit of minorArray.y, grain.x
horizontal: chip, low order bit of minorArray.x, minorArray.y, grain.y
Input, Output, LeftUp, RightDown, ORDToI, LUToLU, OLUToI, ORDToL, Tristate, RDToRD, ORDToLU, LUToI, OLUToRD, LToI, RDToI, Inverter, FlipFlop, ParallelInput, Master
vertical: chip, minorArray, grain.x
horizontal: chip, minorArray, grain.y
InputEnabled
vertical: chip, minorArray, grain
horizontal: chip, minorArray, grain
RAMEven, RAMOdd
chip, minorArray
CreateBase: PROC [sizes: ArrayPosition, useConnectionMachine: BOOLFALSE] RETURNS [array: ArrayBase];
Ignores type and orientation. Uses the rest of the position to size things.
Initialize: PROC [array: ArrayBase];
Fetch: PROC [array: ArrayBase, bit: ArrayPosition, time: INT ← -1] RETURNS [value: BOOL];
Store: PROC [array: ArrayBase, bit: ArrayPosition, value: BOOL];
MasterToSlave: PROC [array: ArrayBase];
Relax: PROC [array: ArrayBase];
Sample: PROC [array: ArrayBase];
ArrayPositionToRope: PROC [position: ArrayPosition] RETURNS [rope: Rope.ROPE];
RopeToArrayPosition: PROC [rope: Rope.ROPE] RETURNS [position: ArrayPosition];
ArrayPositionEqual: RefTab.EqualProc;
ArrayPositionHash: RefTab.HashProc;
The following data structures are not meant to be understood or relied upon by clients.
ArrayBase: TYPE = REF ArrayBaseRec;
ArrayBaseRec: TYPE = RECORD [
sizes: ArrayPosition,
useConnectionMachine: BOOL,
state: ArrayBaseState,
id: CARD,
h: SunRPC.Handle,
c: SunRPCAuth.Conversation];
ArrayBaseState: TYPE = REF ArrayBaseStateRec;
ArrayBaseStateRec: TYPE = RECORD [
positionToEntity: RefTab.Ref, -- grains indexed by Output, minor arrays indexed by RAMEven, long lines by Long
scheduledGrains: Grain ← NIL,
scheduledMinorArrays: MinorArray ← NIL];
MinorArray: TYPE = REF MinorArrayRec;
MinorArrayRec: TYPE = RECORD [
key: ArrayPosition ← NIL,
scheduled: BOOLFALSE,
nextMinorArray: MinorArray ← NIL,
RAMEven, RAMOdd: BOOLFALSE,
vertical: GrainSeq ← NIL,
horizontal: GrainSeq ← NIL];
Grain: TYPE = REF GrainRec;
GrainSeq: TYPE = REF GrainSeqRec;
GrainSeqRec: TYPE = RECORD [elements: SEQUENCE size: CARDINAL OF Grain];
GrainRec: TYPE = RECORD [
key: ArrayPosition ← NIL,
scheduled: BOOLFALSE,
nextGrain: Grain ← NIL,
vertical: BOOLFALSE,
leftUpSelectLeftUp: BOOLFALSE,
leftUp: BOOLFALSE,
rightDownSelectRightDown: BOOLFALSE,
rightDown: BOOLFALSE,
inputSelect: InputSelectIndex ← none,
input: BOOLFALSE,
output: BOOLFALSE,
leftUpGrain: Grain ← NIL,
rightDownGrain: Grain ← NIL,
ORDToL, Tristate: BOOLFALSE,
longControl: LongControl ← off,
longLine: LongLine ← NIL,
minorArray: MinorArray ← NIL,
flipFlop: BOOLFALSE,
master: BOOLFALSE,
invert: BOOLFALSE,
parallelInput: BOOLFALSE,
ORDToI, OLUToI, LUToI, LToI, RDToI: BOOLFALSE,
LUToLU, ORDToLU: BOOLFALSE,
RDToRD, OLUToRD: BOOLFALSE,
perpendicularGrains: SEQUENCE size: CARDINAL OF PerpendicularGrain];
LongControl: TYPE = {off, on, olu};
InputSelectIndex: TYPE = {none, ord, olu, lu, l, rd};
PerpendicularGrain: TYPE = RECORD [
inputEnabled: BOOL,
grain: Grain];
LongLine: TYPE = REF LongLineRec;
LongLineRec: TYPE = RECORD [
key: ArrayPosition ← NIL,
long: BOOL,
grains: SEQUENCE size: CARDINAL OF Grain];
END.