<> <> <> <<>> DIRECTORY Basics, CD, CDDirectory, IFUPW, IO, PW; IFUPWGPCell: CEDAR PROGRAM IMPORTS CD, CDDirectory, IFUPW, IO, PW EXPORTS IFUPW = BEGIN OPEN IFUPW; IFUGPCellRow: PUBLIC PROC [ design: CD.Design, name: PW.ROPE, leftCtl: List, rightCtl: List, 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] = { cells: PW.ListOb; FOR ii: INT DECREASING IN [0..rp.rngByte*rp.rngBit) DO byte, index: INT; [byte, index] _ IFUPW.ByteBitFromIndex[ii, rp]; cells _ CONS[ GPCell[ 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; cell _ PW.AbutListX[design, cells]; cell _ IFUPW.RenameObjAndAssignRowPins [design, cell, name, FALSE, top, bot, leftCtl, rightCtl, rp]; RETURN[cell]}; GPCell: PUBLIC PROC [ design: CD.Design, type: List, top: List, in: List, out: List, bot: List ] RETURNS [cell: CD.Object] = { cellName: PW.ROPE; found: BOOL; topY: INT _ 0; typeObj: CD.Object _ CDDirectory.Fetch[design, type.first].object; delBody: BOOL _ ListLength[out]=0 OR out.first=NIL; IF delBody THEN in _ out _ NIL; top _ FixGVInList[top]; bot _ FixGVInList[bot]; cellName _ UniqueCellName[type.first, top, bot, in, out]; [found, cell] _ CDDirectory.Fetch[design, cellName]; IF found THEN RETURN[cell]; log.PutRope["."]; cell _ PW.Inst[ design: design, ob: typeObj, conds: (IF delBody THEN LIST["Body"] ELSE NIL), removeNamed: TRUE]; topY _ CD.InterestSize[cell].y; IOConnect[design, cell, top, in, out, bot, cell, 0, 0, topY, 0 ]; IFUPW.AddMetalPins[cell, top, bot, 0, topY, 0, FALSE]; PW.RenameObject[design, cell, cellName]; RETURN[cell] }; <<>> <> <> <> <> <> <> <> <> <> <> <> <<>> <> <> <> <> <> <> <> <> <> <> <> END. <<>>