CoreFrame:
CEDAR
DEFINITIONS =
BEGIN
frameCellClass: Core.CellClass;
Frame: TYPE = REF FrameRec;
FrameSeq: TYPE = RECORD[SEQUENCE size: CARDINAL OF CT];
FrameRec:
TYPE =
RECORD[
pos: CD.Position ← [0,0],
size: Size ← TameSize[],
orient: CD.Orientation ← CD.original,
first: Side ← left,
father: CT ← NIL,
data: REF ← NIL,
cell: CT ← NIL,
public: LIST OF ROPE ← NIL,
intOnly: LIST OF ROPE ← NIL,
seq: REF FrameSeq ← NIL ];
ROPE: TYPE = Core.ROPE;
CT: TYPE = Core.CellType;
NewFrameCell: PROC[size: INT, name: ROPE, rec: FrameRec] RETURNS [new: CT];
NewFrameCells: PROC[cells: LIST OF CT, name: ROPE, rec: FrameRec] RETURNS [new: CT];
Fetch: PROC[cell: CT, subCellName: ROPE] RETURNS[subCell: CT];
FCT: PROC[ct: CT] RETURNS[Frame] = INLINE {RETURN[NARROW[ct.data]]};
ExpandType: TYPE = {soft, hard};
SetFrameExpandProc: PROC[type: ExpandType, on: REF, proc: REF ExpandProc];
GetFrameExpandProc: PROC[type: ExpandType, on: REF]RETURNS[ proc: REF ExpandProc];
ExpandProc: TYPE = PROC[type: ExpandType, frameCT: CT];
Expand: PROC[type: ExpandType, frameCT: CT];
NameFrame: PROC[cell: CT, root: ROPE ← NIL];
CellTypeProc: TYPE = PROC RETURNS[cellType: Core.CellType];
RecastFrameSoft: Core.RecastProc;
RecastFrameHard: Core.RecastProc;
RecastWithLayout: PROC[me: CT] RETURNS [new: CT];
FrameInst: PROC[frameCT: CT] RETURNS [instance: CoreClasses.CellInstance←NIL];
CountTransistors: PROC[cell: CT] RETURNS[count: INT ← 0];
CellCached: PROC[name: ROPE] RETURNS[cached: BOOL ← TRUE];
RetrieveAndDecorate: PROC[name: ROPE] RETURNS[cell: CT];
ReadFrameCache: PROC[name: ROPE] RETURNS[frameCT: CT];
WriteFrameCache: PROC[frameCT: CT];
EnumProc: TYPE = PROC[fCT: CT] RETURNS[kids, continue: BOOL ← TRUE];
EnumFrame: PROC[fCT: CT, proc: EnumProc] RETURNS[kids, continue: BOOL ← TRUE];
Side: TYPE = CoreGeometry.Side;
SideRope: ARRAY Side OF ROPE;
NextSide: PROC[side: Side] RETURNS [next: Side];
PrevSide: PROC[side: Side] RETURNS [prev: Side];
OppSide: PROC[side: Side] RETURNS [opp: Side];
SideSides: ARRAY Side OF CoreBlock.Sides = [bottom: bottom, right: right, top: top, left: left];
Size: TYPE = RECORD[x, y: INT, xfree, yfree: Freedom];
Freedom: TYPE = {fixed, tame, wild};
lambda: INT = CMosB.lambda;
minSize: CD.Position = [14*lambda, 16*lambda];
TameSize:
PROC[pair:
CD.Position ← minSize]
RETURNS[size:Size] =
INLINE
{RETURN[[pair.x, pair.y, tame, tame]]};
WildSize:
PROC[pair:
CD.Position ← minSize]
RETURNS[size:Size] =
INLINE
{RETURN[[pair.x, pair.y, wild, wild]]};
FixedSize:
PROC[pair:
CD.Position ← minSize]
RETURNS[size:Size] =
INLINE
{RETURN[[pair.x, pair.y, fixed, fixed]]};
FlipSize:
PROC[size: Size]
RETURNS[Size] =
INLINE
{RETURN[[size.y, size.x, size.yfree, size.xfree]]};
GetSize: PROC[frameCT: CT];
ReSize: PROC[frameCT: CT];
RePos: PROC[frameCT: CT, new: CD.Position ← [0, 0]];
RotateFrame: PROC[frameCT: CT, orient: CD.Orientation ← CD.original];
RotateCellType: PROC[cell: CT, orient: CD.Orientation] RETURNS[new: CT];
OrientSideSide: PUBLIC ARRAY CD.Orientation OF ARRAY Side OF Side;
FixOneSize: PROC[frameCT: CT] RETURNS[fixed1: BOOL ← FALSE];
GetLog: PROC RETURNS[IO.STREAM];
LogFCT: PROC[frameCT: CT, indent: INT, lim: INT, out: IO.STREAM ← NIL];
LogFrameData: PROC[frame: Frame, indent: INT, cr: BOOL, out: IO.STREAM ← NIL];
FullFrameName: PROC[frameCT: CT] RETURNS[name: ROPE];
DrawFrame: PROC[frameCT: CT, detailed: BOOL ← TRUE] RETURNS[cell: CD.Object];
FlattenOnce: PROC[frameCT: CT] RETURNS[new: CT];
TestMergeProc: TYPE = PROC[frameCT: CT] RETURNS[merge: BOOL];
TestMergeNodes:
PROC[frameCT:
CT, testProc: TestMergeProc ←
NIL
-- TRUE -- ]
RETURNS[new: CT];
AddExtention: PROC[frameCT: CT];
TellKidsAboutDad: PROC[frameCT: CT];
Neighbor: PROC[frameCT: CT, side: Side] RETURNS[neighborCT: CT, ok: BOOL];
END.