IFUGVCellRow:
PUBLIC
PROC [
design: CD.Design,
name: PW.ROPE,
ctl: List,
type: LIST OF REF,
top: LIST OF REF,
in: LIST OF REF,
out: LIST OF REF,
bot: LIST OF REF,
seq:
BOOL ←
FALSE ]
RETURNS [cellName: PW.ObjName] = {
cells: LIST OF PW.ObjName;
FOR ii:
INT
DECREASING
IN [0..rngByte*rngBit)
DO
byte, index: INT;
[byte, index] ← IFUPW.ByteBitFromIndex[ii, seq];
cells ←
CONS[ GVCell[
design: design,
type: ExpandList[byte, index, type],
top: ExpandList[byte, index, top],
in: ExpandList[byte, index, in],
out: ExpandList[byte, index, out],
bot: ExpandList[byte, index, bot]], cells];
ENDLOOP;
cellName ← IFUPW.AbutListX[design, cells];
cellName ←
IFUPW.AssignRowPinsAndRename
[design, cellName, name, FALSE, top, bot, ctl, seq];
RETURN[cellName]};
GVCell:
PUBLIC
PROC [
design: CD.Design,
type: List,
top: List,
in: List,
out: List,
bot: List ]
RETURNS [cellName: PW.ObjName] = {
topY, in1Y, in2Y, outY, botY: INT ← 0;
cell: CD.ObPtr;
typeN: PW.ROPE ← type.first;
in1N: PW.ROPE ← IF in=NIL THEN NIL ELSE in.first;
in2N: PW.ROPE ← IF in=NIL THEN NIL ELSE IF in.rest=NIL THEN NIL ELSE in.rest.first;
outN: PW.ROPE ← IF out=NIL THEN NIL ELSE out.first;
top ← FixGVInList[top];
bot ← FixGVInList[bot];
cellName ← UniqueCellName[typeN, top, bot, in, out];
IF CDDirectory.Fetch[design, cellName].found THEN RETURN[cellName];
PWBasics.Output["."];
cell ← PWBasics.ObjFromName[
design: design,
name:
PW.Inst[
name: typeN,
conds: (IF outN=NIL THEN LIST["Body"] ELSE NIL),
removeNamed: TRUE]];
topY ← PWBasics.GetISize[cell].y;
IF outN#
NIL
THEN{
pinApl: CD.ApplicationPtr ← CDPinObjects.FindPins[cell, "Out"].first;
outY ← pinApl.location.y;
CDPinObjects.SetName[pinApl, NIL];
IF in1N#
NIL
THEN {
pinApl ← CDPinObjects.FindPins[cell, "In1"].first;
in1Y ← pinApl.location.y;
CDPinObjects.SetName[pinApl, NIL]};
IF in2N#
NIL
THEN {
pinApl ← CDPinObjects.FindPins[cell, "In2"].first;
in2Y ← pinApl.location.y;
CDPinObjects.SetName[pinApl, NIL] } };
IOConnect[cell, top, in1N, in2N, outN, bot, 0, topY, in1Y, in2Y, outY, botY ];
PWBasics.RepositionCell[design, cell];
[ ] ← CDDirectory.Rename[design, cell, cellName];
RETURN[cellName] };