CDFrame:
CEDAR
DEFINITIONS =
BEGIN
Frame: TYPE = REF FrameSeq;
FrameSeq:
TYPE =
RECORD[
shell: REF ShellRec ← NIL,
data: REF ← NIL,
father: Frame ← NIL,
xory: XorY,
unordered: BOOL ← FALSE,
orient: CD.Orientation ← CD.original,
seq: SEQUENCE seqSize: CARDINAL OF Frame ];
ShellRec:
TYPE =
RECORD[
name: IO.ROPE,
size: Size ← TameSize[],
pos: CD.Position ← [0,0],
pins: ARRAY Side OF REF PinSeq ];
PinSeq:
TYPE =
RECORD[
locInfo: LocInfo ← unk,
seq: SEQUENCE seqSize: CARDINAL OF REF PinRec ];
XorY: TYPE = {x,y};
LocInfo: TYPE = {unk, implied, floating, sequencial, fixed};
PinRec:
TYPE =
RECORD [
name: IO.ROPE,
side: Side,
pos: CD.Position,
size: CD.Position,
layer: CD.Layer ];
Side5: TYPE = PWPins.Side;
Side: TYPE = Side5[bottom..none);
SideRope: ARRAY Side OF IO.ROPE;
Size: TYPE = RECORD[x, y: INT, xfree, yfree: Freedom];
Freedom: TYPE = {fixed, tame, wild};
minSize: CD.Position = [14*CMosB.lambda, 16*CMosB.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]]};
GlueSpec:
TYPE =
RECORD[
tDir: PWRoute.HorV,
params: PWRoute.RouterParams ← NIL,
class: GlueClass ← fill,
type: ARRAY Side OF GlueSideType,
obj: ARRAY Side OF CD.Object ← ALL[NIL] ];
GlueSideType: TYPE = {cap, conn, pwr, ext, chan, sum, diff};
GlueClass: TYPE = {fill, ext, xlt, chan, pwr, sb, bad};
SetGlueClass: PROC[glue: REF GlueSpec];
NewFrame:
PROC[size:
INT, xory: XorY, name:
IO.
ROPE, data:
REF←
NIL, unord:
BOOL←
FALSE]
RETURNS [new: Frame];
NewExpandFrame:
PROC[name:
IO.
ROPE, proc: ExpandProc]
RETURNS [frame: Frame];
NewObjectFrame:
PROC[cell:
CD.Object]
RETURNS[frame: Frame];
NewShellFileFrame:
PROC[name:
IO.
ROPE]
RETURNS [frame: Frame];
Glue:
PROC[
name: IO.ROPE ← NIL,
l,r,b,t: GlueSideType ← cap, -- cap conn ext chan sum diff
bObj,rObj,tObj,lObj: CD.Object ← NIL,
tDir: PWRoute.HorV ← horizontal, -- vertical horizontal
tLayer: IO.ROPE ← NIL, -- metal metal2 poly
bLayer: IO.ROPE ← NIL,
xlate:
BOOL ←
FALSE ]
--
metal2
poly metal
RETURNS [new: Frame];
ID: PROC[name: IO.ROPE] RETURNS[unique: IO.ROPE];
FullFrameName: PROC[frame: Frame] RETURNS[name: IO.ROPE];
FlattenOnce: PROC[frame: Frame] RETURNS[new: Frame];
TestMergeProc: TYPE = PROC[frame: Frame] RETURNS[merge: BOOL];
TestMergeNodes:
PROC[frame: Frame, testProc: TestMergeProc ←
NIL
-- TRUE -- ]
RETURNS[new: Frame];
NextSide: PROC[side: Side] RETURNS [next: Side];
PrevSide: PROC[side: Side] RETURNS [prev: Side];
OppSide: PROC[side: Side] RETURNS [opp: Side];
GetSidePos: PROC[pin: REF PinRec] RETURNS [INT];
SetSidePos: PROC[pin: REF PinRec, pos: INT];
ShellFromDesign: PROC[design: REF] RETURNS [shell: REF ShellRec];
ShellFromObject: PROC[cell: CD.Object] RETURNS [shell: REF ShellRec];
ShellFromFile: PROC[shellName: IO.ROPE] RETURNS [shell: REF ShellRec];
ShellToFile: PROC[shell: REF ShellRec];
ShellToBlock: PROC[design: CD.Design, shell: REF ShellRec] RETURNS [obj: CD.Object];
ShellToObject:
PROC[design:
CD.Design, shell:
REF ShellRec, detailed:
BOOL ←
TRUE]
RETURNS[cell: CD.Object];
FrameToObject:
PROC[frame: Frame, design:
CD.Design, detailed:
BOOL ←
TRUE]
RETURNS [obj: CD.Object];
BlankCell:
PROC[design:
CD.Design, size:
CD.Position]
RETURNS[cell: CD.Object];
ExpandProc:
TYPE =
PROC[frame: Frame, design:
CD.Design ←
NIL]
RETURNS [new: Frame];
SpecificFrameProc:
TYPE =
PROC[frame: Frame, name:
IO.
ROPE, design:
CD.Design ←
NIL]
RETURNS [new: Frame, done: BOOL];
ExpandFrame: ExpandProc;
DeleteZeroFrames: PROC[frame: Frame] RETURNS[new: Frame];
ReadShellFrame: SpecificFrameProc;
WriteShellFrame: SpecificFrameProc;
ReOrient: PROC[frame: Frame, design: CD.Design, orient: CD.Orientation ← CD.original];
EnumProc: TYPE = PROC[frame: Frame];
EnumFrameTopFirst: PROC[frame: Frame, proc: EnumProc];
EnumFrameBotFirst: PROC[frame: Frame, proc: EnumProc];
EnumFrameBotOnly: PROC[frame: Frame, proc: EnumProc];
TellKidsAboutDad: PROC [dad: Frame];
Neighbor:
PROC [leaf: Frame, side: Side]
RETURNS[neighbor: Frame, ok: BOOL];
ListFrame: PROC[frame: Frame, limit: INT ← -1] RETURNS[listing: IO.ROPE];
LogFrame: PROC[frame: Frame, limit: INT ← -1, out: IO.STREAM ← NIL];
SizeCode: PROC[a: INT] RETURNS[INT];
SizePos: PROC[size: CD.Position] RETURNS[CD.Position];
ObjSize: PROC[ob: CD.Object] RETURNS[size: CD.Position];
GetSize: PROC[frame: Frame];
PutSize: PROC[frame: Frame];
PutPos: PROC[frame: Frame, new: CD.Position];
GetPins: PROC[frame: Frame];
FixOneSize: PROC[frame: Frame] RETURNS[fixed1: BOOL ← FALSE];
ScaledText:
PROC[design:
CD.Design, text:
IO.
ROPE, box:
CD.Position, layer:
CD.Layer]
RETURNS[cell: CD.Object];
GetLog: PROC RETURNS[IO.STREAM];
END.