DIRECTORY CD, Core, IFUCoreCells, CoreFrame, CoreLibrary, CoreName, CoreOps, CoreInstCell, IFUCorePads, IO, Rope; IFUCorePadsImpl: CEDAR PROGRAM IMPORTS IFUCoreCells, CoreFrame, CoreLibrary, CoreName, CoreOps, CoreInstCell, IO, Rope EXPORTS IFUCorePads = BEGIN ROPE: TYPE = Core.ROPE; CellType: TYPE = Core.CellType; Side: TYPE = CoreFrame.Side; PadsType: TYPE = IFUCorePads.PadsType; Pad: TYPE = IFUCorePads.Pad; Signal: SIGNAL = CODE; padCellClass: PUBLIC Core.CellClass _ CoreOps.SetClassPrintProc[ NEW[Core.CellClassRec _ [name: "IFUCorePads", recast: NIL]], ClassPrintProc]; ClassPrintProc: CoreOps.PrintClassProc ~ { padData: Pad _ NARROW[data]; IO.PutF[out, "\nPad: side: %g, type: %g,", IO.rope[CoreFrame.SideRope[padData.side]], IO.rope[PadsTypeRp[padData.type]]]; IO.PutF[out, "data1: %g, data2: %g, enWtA: %g, enWtB: %g, enWtC: %g", IO.rope[padData.data1], IO.rope[padData.data2], IO.rope[padData.enWtA], IO.rope[padData.enWtB], IO.rope[padData.enWtC] ]; IO.PutF[out, "enRd: %g, disRd: %g", IO.rope[padData.enRd], IO.rope[padData.disRd] ] }; CellProc: PUBLIC PROC [ name: ROPE _ NIL, data: IFUCorePads.PadRec ] RETURNS [cellType: CellType] = { cellType _ CoreOps.SetCellTypeName[ NEW [ Core.CellTypeRec _ [ class: padCellClass, public: CoreOps.CreateWires[0], data: NEW[IFUCorePads.PadRec _ data] ] ], name]; CoreFrame.SetFrameExpandProc [soft, cellType, NEW[CoreFrame.ExpandProc _ Expand] ]; CoreFrame.SetFrameExpandProc [hard, cellType, NEW[CoreFrame.ExpandProc _ Expand] ]}; Expand: CoreFrame.ExpandProc = { renameProc: CoreInstCell.RenameProc ~ { SELECT (new _ CoreName.RopeNm[old]) FROM padvdd => RETURN[padVDD]; padgnd => RETURN[padGND]; vdd => RETURN[VDD]; gnd => RETURN[GND]; padSig => RETURN[CoreName.RopeNm[ SELECT TRUE FROM pad.type=conn => pad.data1, pad.data1#NIL => Rope.Cat["Pad-", pad.data1], pad.data2#NIL => Rope.Cat["Pad-", pad.data2], ENDCASE => CoreName.ID["Pad-"] ] ]; toChip => RETURN[CoreName.RopeNm[ pad.data1 ]]; fromChip => RETURN[CoreName.RopeNm[ pad.data2 ]]; clock => RETURN[CoreName.RopeNm[ pad.data1 ]]; nClock => RETURN[CoreName.RopeNm[ pad.data2 ]]; enRd => RETURN[CoreName.RopeNm[ pad.enRd ]]; disRd => RETURN[CoreName.RopeNm[ pad.disRd ]]; enWtA => RETURN[CoreName.RopeNm[ pad.enWtA ]]; enWtB => RETURN[CoreName.RopeNm[ pad.enWtB ]]; enWtC => RETURN[CoreName.RopeNm[ pad.enWtC ]]; phA => RETURN[PhA]; phB => RETURN[PhB]; ENDCASE => Signal[] }; name: ROPE; pad: Pad _ NARROW[frameCT.data]; generic: CellType _ Pads [pad]; specific: CellType _ CoreInstCell.SpecificGeneric[generic, renameProc]; name _ CoreName.CellNm[frameCT, name].n; name _ IF name#NIL THEN name ELSE IF pad.data1#NIL THEN pad.data1 ELSE pad.data2; [ ] _ CoreName.CellNm[specific, name]; [ ] _ CoreName.CellNm[frameCT, name]; frameCT.data _ NEW[CoreFrame.FrameRec _ [ first: left, cell: specific, seq: NEW[CoreFrame.FrameSeq[0]] ] ]; frameCT.class _ CoreFrame.frameCellClass; CoreFrame.SetFrameExpandProc [soft, frameCT, NIL]; CoreFrame.SetFrameExpandProc [hard, frameCT, NIL]}; Pads: PROC[pad: Pad] RETURNS[cell: Core.CellType] = { name: ROPE _ PadsTypeRp[pad.type].Cat[".mask"]; conditions: LIST OF ROPE _ NIL; AppendCondition: PROC[sig, ref: ROPE] = { SELECT sig _ CoreName.RopeNm[sig] FROM NIL => { }; gnd, GND => conditions _ CONS[Rope.Cat[ref, "Gnd"], conditions]; vdd, VDD => conditions _ CONS[Rope.Cat[ref, "Vdd"], conditions]; ENDCASE => conditions _ CONS[ref, conditions]}; AppendCondition[pad.enWtA, enWtA]; AppendCondition[pad.enWtB, enWtB]; AppendCondition[pad.enRd, enRd]; AppendCondition[pad.disRd, disRd]; cell _ CoreLibrary.Get[IFUCoreCells.libraryPads, name, FALSE, conditions, 0, TRUE]; IF pad.side#top THEN { norm: Core.CellType _ cell; name _ Rope.Cat[CoreFrame.SideRope[pad.side], "-", CoreName.CellNm[norm].n]; cell _ CoreLibrary.Get[IFUCoreCells.libraryPads, name]; IF cell=NIL THEN { cell _ SELECT pad.side FROM left => CoreFrame.RotateCellType[norm, rotate90], bottom => CoreFrame.RotateCellType[norm, rotate180X], right => CoreFrame.RotateCellType[norm, rotate90X], ENDCASE => ERROR; CoreLibrary.Set[IFUCoreCells.libraryPads, name, cell]} } }; PadsTypeRp: ARRAY PadsType OF ROPE = [ -- all have PadVdd PadGnd Vdd Gnd empty: CoreName.RopeNm["ExtBlankPad"], conn: CoreName.RopeNm["ExtConnectPad"], -- Pad in: CoreName.RopeNm["ExtInputPad"], -- toChip out: CoreName.RopeNm["ExtOutputPad"], -- fromChip gate2Out: CoreName.RopeNm["ExtGate2OutPad"], -- fromChip enWA gate3Out: CoreName.RopeNm["ExtGate3OutPad"], -- fromChip enWA enWB gate4Out: CoreName.RopeNm["ExtGate4OutPad"], -- fromChip enWA enWB enWC triOut: CoreName.RopeNm["ExtIOTstPad"], --toChip fromChip enWA enWB phA phB triIO: CoreName.RopeNm["ExtIOTstIOPad"], -- triOut + enRd disRd clock: CoreName.RopeNm["ExtClockPad"], -- Clock nClock ext: CoreName.RopeNm["ExtPadExtention"], -- needs to be rotated 270 corLo: CoreName.RopeNm["ExtPadGndVddCorner"], corHi: CoreName.RopeNm["ExtPadGndVddCornerHi"], gnd: CoreName.RopeNm["ExtGndPad"], vdd: CoreName.RopeNm["ExtVddPad"], padgnd: CoreName.RopeNm["ExtPadGndPad"], padvdd: CoreName.RopeNm["ExtPadVddPad"] ]; padvdd: ROPE _ CoreName.RopeNm["PadVdd"]; padgnd: ROPE _ CoreName.RopeNm["PadGnd"]; padVDD: ROPE _ CoreName.RopeNm["PadVDD"]; padGND: ROPE _ CoreName.RopeNm["PadGND"]; vdd: ROPE _ CoreName.RopeNm["Vdd"]; gnd: ROPE _ CoreName.RopeNm["Gnd"]; VDD: ROPE _ CoreName.RopeNm["VDD"]; GND: ROPE _ CoreName.RopeNm["GND"]; padSig: ROPE _ CoreName.RopeNm["Pad"]; toChip: ROPE _ CoreName.RopeNm["toChip"]; fromChip: ROPE _ CoreName.RopeNm["fromChip"]; clock: ROPE _ CoreName.RopeNm["Clock"]; nClock: ROPE _ CoreName.RopeNm["nClock"]; enRd: ROPE _ CoreName.RopeNm["enRd"]; disRd: ROPE _ CoreName.RopeNm["disRd"]; enWt: ROPE _ CoreName.RopeNm["enWt"]; enWtA: ROPE _ CoreName.RopeNm["enWA"]; enWtB: ROPE _ CoreName.RopeNm["enWB"]; enWtC: ROPE _ CoreName.RopeNm["enWC"]; phA: ROPE _ CoreName.RopeNm["phA"]; phB: ROPE _ CoreName.RopeNm["phB"]; PhA: ROPE _ CoreName.RopeNm["PhA"]; PhB: ROPE _ CoreName.RopeNm["PhB"]; END. ΖIFUCorePadsImpl.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Last Edited by Curry, October 17, 1986 11:34:42 am PDT Last Edited by: Louis Monier February 10, 1987 7:43:29 pm PST In order to get Vdd and Gnd to connect internally must flatten one level with some funny overlapping name object or else call something like CoreBlock.MergeSplitWires cell _ CoreLibrary.Get[IFUCoreCells.libraryPads, name, FALSE, conditions, -1]; Κή˜šœ™Jšœ<™