DIRECTORY Basics, CD, CDDirectory, CDPinObjects, IFUPW, PW, PWBasics; IFUPWGVCell: CEDAR PROGRAM IMPORTS CDDirectory, CDPinObjects, IFUPW, PW, PWBasics EXPORTS IFUPW = BEGIN OPEN IFUPW; 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] }; END. œIFUPWGVCell.mesa, Copyright c 1985 by Xerox Corporation. All rights reserved. Last Edited by Curry, June 6, 1985 0:50:49 am PDT NandTest: PROC[design: CD.Design] RETURNS[cell: PW.ObjName] = { cell _ GVCell[ enable: NIL, disable: NIL, type: LIST["GVNand"], top: LIST["A", "B", NIL, "D"], in1: LIST["A"], in2: LIST["B"], out: LIST["C"], bot: LIST[NIL, "C", NIL, "D"], design: design ] }; LatchTest: PROC[design: CD.Design] RETURNS[cell: PW.ObjName] = { cell _ GVCell[ enable: "En", disable: "VBB", type: LIST["GVLatch"], top: LIST[NIL, "C", NIL, "D"], in1: LIST["A"], in2: NIL, out: LIST["D"], bot: LIST["A", "C", NIL, "D"], design: design ] }; Ê蘚œ™Jšœ<™