Types and data structures
ROPE: TYPE = Rope.ROPE;
SequenceOfExistance:
TYPE =
RECORD [
contents: SEQUENCE size: PosNb OF PACKED ARRAY HorTileType OF BOOL];
Context: TYPE = REF ContextRec;
ContextRec:
TYPE =
RECORD [
design: CD.Design, -- used by TileArrayToGeometry
computedCells: RefTab.Ref, -- internally used by TileArrayToGeometry
table: AlpsBool.TableOfVariables,
tileArray: TileArray, -- Filled by TableAndPositionToTileArray
columnsExistance: REF SequenceOfExistance, -- Filled by TableAndPositionToTileArray
isLatched: BOOL ← FALSE, -- Filled by TableAndPositionToTileArray
distanceBetweenGlue: INT ← 4,
distanceBetweenContacts: INT ← 10,
nbAuxVarEachGlue: INT ← 0,
shared: BOOL ← FALSE,
debug: BOOL ← FALSE
];
Tile: TYPE = REF TileRec;
TileRec:
TYPE =
RECORD [
special: BOOL ← FALSE, -- when TRUE only name is valid
input: BOOL ← FALSE, -- when TRUE we are on LeftInput or RightInput
route: BOOL ← FALSE, -- when TRUE we are on RightRoute
Flags when input is TRUE
leftSide: BOOL ← FALSE, -- when TRUE the tile is leftinput (not right input). Necessary for Gnd transistors.
throughTrans: BOOL ← FALSE, -- when TRUE transistor according to high and low
gndTrans: BOOL ← FALSE, -- when TRUE transistor according to high and low
contact: BOOL ← FALSE, -- when TRUE contact between poly and metal according to high and low
high: BOOL ← FALSE, -- when TRUE one of the previous is refering to high
low: BOOL ← FALSE, -- when TRUE one of the previous is refering to low (high and low may be both TRUE)
Flags when route is TRUE
contactPoly: BOOL ← FALSE, -- when TRUE a contact between metal and poly according to spin
noUpPoly: BOOL ← FALSE, -- when TRUE no poly up
noDownPoly: BOOL ← FALSE, -- when TRUE no poly down
noLeftMetal: BOOL ← FALSE, -- when TRUE it assumes connection on the right side
noRightMetal: BOOL ← FALSE, -- when TRUE it assumes connection on the left side
spin: BOOL ← TRUE, -- when contactPoly, if TRUE (/FALSE) connects left (/right) poly to upper metal
Field when special is TRUE
name: ROPE ← NIL, -- name of the cell.
Fields always valid
leftPin, rightPin: BOOL ← TRUE -- necessary for stretching
];
HorTileType: TYPE = {LeftInput, RightInput, RightRoute, VddGlue, GndGlue};
TileArray: TYPE = REF TileArrayRec;
TileArrayRec:
TYPE =
RECORD [
contents: SEQUENCE lastPosNb: PosNb OF ARRAY HorTileType OF LIST OF Tile]; -- from left to right, from LeftVdd to Self, from bottom to top
PosNb: TYPE = AlpsBool.VarNb;
Procs
TILE: PUBLIC PROC [tileRec: TileRec] RETURNS [tile: Tile];
EqualTile: PROC [tile1, tile2: Tile] RETURNS [sameTile: BOOL ← TRUE];
EqualTileRec: PUBLIC PROC [tileRec1, tileRec2: TileRec] RETURNS [sameTileRec: BOOL ← TRUE];
NilTile: PROC [horTileType: HorTileType] RETURNS [tile: Tile];
Uses the context for affecting its field tileArray
TableAndPositionToTileArray: PUBLIC PROC [context: Context];