IFUPW:
CEDAR
DEFINITIONS
IMPORTS CDFrame =
BEGIN
log: IO.STREAM;
ROPE: TYPE = IO.ROPE;
Object: TYPE = CD.Object;
Size: TYPE = CD.Position;
Location: TYPE = CD.Position;
List: TYPE = LIST OF ROPE;
ProcessorReg: TYPE = DragOpsCross.ProcessorRegister;
Side: TYPE = CDFrame.Side;
ValArray: TYPE = ARRAY [0..4) OF ARRAY [0..8) OF INT; -- rngByte and rngBit
IFUDataColSeq: RowParams;
IFUDataColNSeq: RowParams;
RowParams: TYPE = REF RowParamsRec;
RowParamsRec:
TYPE =
RECORD[
seq: BOOL ← FALSE,
rngByte: INT ← 4,
rngBit: INT ← 8 ];
nofVWires: INT = 8;
Technology specific -- Impl in IFUPWCMos
cmos: READONLY CD.Technology;
cellWidth: INT;
lambda: INT;
topTail: INT;
leftTail: INT;
botTail: INT;
pwrW: INT;
metW: INT;
metPitch: INT;
met2W: INT;
met2Pitch: INT;
polW: INT;
polPitch: INT;
polMuxPitch: INT;
difW: INT;
cnctSize: INT;
cmosNDif: CD.Layer;
cmosPDif: CD.Layer;
cmosWPDif: CD.Layer;
cmosWNDif: CD.Layer;
cmosPoly: CD.Layer;
cmosMet: CD.Layer;
cmosMet2: CD.Layer;
cmosNWCont: CD.Layer;
cmosPWCont: CD.Layer;
cmosNWell: CD.Layer;
TransistorObject: PROC[size: Size, difLayer: CD.Layer] RETURNS[trans: CD.Object];
Contact: PROC[layer: CD.Layer] RETURNS[cntc: CD.Object];
GND: ROPE;
VDD: ROPE;
Error: ERROR[msg: ROPE];
IOConnect:
PROC[
design: CD.Design,
cell: CD.Object,
top: List,
in: List,
out: List,
bot: List,
refcell: CD.Object,
refX: INT,
refY: INT,
topY: INT,
botY: INT ];
RenameObjAndAssignRowPins:
PROC[
design: CD.Design,
row: CD.Object,
newObjName: ROPE,
identity: BOOL ← TRUE,
top: LIST OF REF ← NIL,
bot: LIST OF REF ← NIL,
leftCtl: List ← NIL,
rightCtl: List ← NIL,
rp: RowParams ← IFUDataColNSeq ]
RETURNS[newObject: CD.Object];
PinNameProc: TYPE = PROC[pin: CD.Instance, side: Side] RETURNS[name: ROPE];
RenameObjAndPins:
PROC[
design: CD.Design,
object: CD.Object,
newObjName: ROPE,
pinNameProc: PinNameProc]
RETURNS [newObject: CD.Object];
Merge: PROC[design: CD.Design, side: Side, cell1, cell2: ObjName]
RETURNS[cell: ObjName];
Pad144Type: TYPE = {empty, in,out, tri, clock, padgnd,padvdd, gndcnr,vddcnr, gnd,vdd, ext};
Pad144ToSideIndex: PROC[pad: INT] RETURNS[side: Side, index: INT];
Pad144FromSideIndex: PROC[side: Side, index: INT] RETURNS[pad: INT];
Pad144: PROC[design: CD.Design, side: Side, index: INT, pad: Pad144Type, data1, data2, enable: ROPE ← NIL] RETURNS[frame: Frame];
RawPad: PROC[type: IFUPW.Pad144Type] RETURNS[CD.Object];
ChangePinName: PROC[obj: CD.Object, oldName, newName: ROPE];
AddMetalPins: PROC[cell: CD.Object, top, bot: List, refX, topY, botY: INT, realNames: BOOL];
AddRet: PROC [cell: CD.Object, size: Size, loc: Location, level: CD.Layer];
PutPin: PROC [cell: CD.Object, size: Size, loc: Location, level: CD.Layer, name: ROPE];
ByteBitFromIndex: PROC[index: INT, rp: RowParams] RETURNS[byte, bit: INT];
ByteBitToIndex: PROC[byte, bit: INT, rp: RowParams] RETURNS[index: INT];
ProcRegToList: PROC [reg: ProcessorReg] RETURNS[new: List];
CardToList8: PROC [val: CARDINAL] RETURNS[new: List];
FixGVInList: PROC [list: List] RETURNS[new: List];
DelGVFromList: PROC [list: List] RETURNS[new: List];
AddGVToList: PROC [list: List] RETURNS[new: List];
AddGVToLIST: PROC [list: LIST OF REF, indexGV: BOOL] RETURNS[new: LIST OF REF];
ListAllNil: PROC [list: List] RETURNS[allNIL: BOOL];
LISTAllNil: PROC [list: LIST OF REF] RETURNS[allNIL: BOOL];
ReverseLIST: PROC [list: LIST OF REF] RETURNS[new: LIST OF REF];
ReverseList: PROC [list: List] RETURNS[new: List];
ListConcat: PROC [list1, list2: List] RETURNS[new: List];
ListLength: PROC [list: List] RETURNS[size: INT];
LISTLength: PROC [list: LIST OF REF] RETURNS[size: INT];
ListIndexItem: PROC [list: List, index: INT] RETURNS[item: ROPE];
LISTIndexItem: PROC [list: LIST OF REF, index: INT] RETURNS[item: REF];
ListItemIndexMin: PROC [list: List, item: ROPE] RETURNS[index: INT];
ListItemIndexMax: PROC [list: List, item: ROPE] RETURNS[index: INT];
ListNonNILIndexMin: PROC [list: List] RETURNS[index: INT];
ListNonNILIndexMax: PROC [list: List] RETURNS[index: INT];
List4: PROC [r0, r1, r2, r3: ROPE] RETURNS[list: List];
List8: PROC [r0, r1, r2, r3, r4, r5, r6, r7: ROPE] RETURNS[list: List];
Listn:
PROC [r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15:
ROPE ←
NIL]
RETURNS[list: List];
LISTn:
PROC [r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15:
REF ←
NIL]
RETURNS[list: LIST OF REF];
FillerCell:
PROC
[design: CD.Design, obj: CD.Object, objSide: Side, width: INT, copyPins: BOOL ← FALSE]
RETURNS [cell: CD.Object];
UniqueCellName: PROC[type: ROPE, top, bot, ins, outs: List] RETURNS[name: ROPE];
AppendIndexToRope:
PROC[index:
INT, item:
ROPE]
RETURNS[
ROPE];
ExpandList:
PROC[index1, index2:
INT, list:
LIST
OF
REF]
RETURNS[new: List];
WriteOutNewDesign: PROC[design: CD.Design, newName: ROPE];
GetDesign: PROC[ref: REF] RETURNS[design: CD.Design];
PlotDesign: PROC[design: CD.Design, pos, sPos: Location ← [0, 0]];
UserProc: TYPE = PROC [design: CD.Design] RETURNS [cell: CD.Object];
PWUserProc: TYPE = PW.UserProc;
Register: PROC [userProc: PWUserProc, name: ROPE];
XorY: TYPE = CDFrame.XorY;
Frame: TYPE = REF CDFrame.FrameSeq ← NIL;
FrameToObject:
PROC[frame:
REF CDFrame.FrameSeq, design:
CD.Design]
RETURNS [obj: CD.Object] = INLINE {RETURN[CDFrame.FrameToObject[frame, design]]};
NFS,
NewFrameSeq:
PROC[
module: ROPE,
xory: XorY,
listTopLt: LIST OF Frame,
orient: CD.Orientation ← CD.original ]
RETURNS[frame: Frame];
NFSFUP,
NewFrameSeqFromListUserProc:
PROC[
module: ROPE,
xory: XorY,
listTopLt: LIST OF UserProc,
orient: CD.Orientation ← CD.original ]
RETURNS[frame: Frame];
ShowObject: PROC[cell: CD.Object];
Show5Objects: PROC[bottom, right, top, left, middle: CD.Object];
ShowFrameBlock: PROC[frame: Frame];
AssembleFrame:
PROC[
ref: REF,
frame: REF CDFrame.FrameSeq,
cmd: Commander.Handle ← NIL,
name: ROPE ← NIL ];
DoCommandOptions:
PROC[
design: CD.Design,
cell: CD.Object,
module: ROPE,
cmd: Commander.Handle ];
GPCell:
PROC [
design: CD.Design,
type: List,
top: List,
in: List,
out: List,
bot: List ]
RETURNS [cell: CD.Object];
IFUGPCellRow:
PROC [
design: CD.Design,
name: ROPE,
leftCtl: List ← NIL,
rightCtl: List ← NIL,
type: LIST OF REF,
top: LIST OF REF,
in: LIST OF REF,
out: LIST OF REF,
bot: LIST OF REF,
rp: RowParams ← IFUDataColNSeq ]
RETURNS [cell: CD.Object];
CarryCtl: TYPE = RECORD [gin, cout, pin, gout, cin, pout: ROPE ← NIL];
IFUAdderRow:
PROC[
design: CD.Design,
name: ROPE,
leftCtl: List ← NIL,
rightCtl: List ← NIL,
top: LIST OF REF ← NIL,
in: LIST OF REF ← NIL,
out: LIST OF REF ← NIL,
bot: LIST OF REF ← NIL,
sums: INT ← 1,
rp: RowParams ← IFUDataColNSeq ]
RETURNS[cell: CD.Object];
IFUMuxRow:
PROC [
design: CD.Design,
name: ROPE,
leftCtl: List ← NIL,
rightCtl: List ← NIL,
top: LIST OF REF,
in: LIST OF REF,
out: LIST OF REF,
bot: LIST OF REF,
rp: RowParams ← IFUDataColNSeq ]
RETURNS [cell: CD.Object];
IFUDecoderRow:
PROC [
design: CD.Design,
name: ROPE,
ctl: List, -- total nof names must be 2*nof significant bits
val: REF ValArray, -- 1st ctl is MSB TRUE eg. bit0 bit0' bit1 bit1' ...
top: LIST OF REF,
out: LIST OF REF,
bot: LIST OF REF,
rp: RowParams ← IFUDataColNSeq ]
RETURNS [cell: CD.Object];
SwitchBoxRow:
PROC [
design: CD.Design,
name: ROPE,
rowType: CD.Layer,
topRP: RowParams ← IFUDataColNSeq,
top: LIST OF REF,
left: List,
right: List,
bot: LIST OF REF,
botRP: RowParams ← IFUDataColNSeq,
m2Pitch: BOOL ← FALSE ]
RETURNS [cell: CD.Object];
IFUMatchRow:
PROC[
design: CD.Design,
name: ROPE,
chkFor: LIST OF REF, -- GND or VDD at byte level of tree
top: LIST OF REF,
in1: INT ← 0, -- input must be leftmost column, also used for routing
col2: INT ← 1, -- blank column needed for routing
col3: INT ← 2, -- blank column needed for routing
sideOuts: List ← NIL, -- up to four bytes can be checked, NIL => blank
outsSide: Side ← right,
bot: LIST OF REF ←NIL, -- must be same as top with 3 used columns NIL
rp: RowParams ← IFUDataColNSeq ]
RETURNS[cell: CD.Object];
END.