DIRECTORY CD, Core, CoreBlock, IFUCoreCells, CoreFrame, CoreLibrary, CoreName, CoreOps, CoreInstCell, IFUCorePads, IO, PW, PWCore, Rope; IFUCorePadsImpl: CEDAR PROGRAM IMPORTS CoreBlock, IFUCoreCells, CoreFrame, CoreLibrary, CoreName, CoreOps, CoreInstCell, IO, PW, PWCore, 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", IO.rope[padData.data1], IO.rope[padData.data2], IO.rope[padData.enWtA], IO.rope[padData.enWtB] ]; 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[ pad.data1 ]]; 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 ]]; phA => RETURN[PhA]; phB => RETURN[PhB]; ENDCASE => Signal[] }; name: ROPE; pad: Pad _ NARROW[frameCT.data]; generic: CellType _ Pads [pad.side, pad.type]; 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[side: Side, type: PadsType] RETURNS[cell: Core.CellType] = {CheckPads[]; RETURN[ pads[side][type] ]}; pads: REF ARRAY Side OF ARRAY PadsType OF Core.CellType _ NIL; 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 triOut: CoreName.RopeNm["ExtIOTstPad"], -- toChip fromChip enWA enWB phA phB triIO: CoreName.RopeNm["ExtIOTstPad"], -- 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["ExtPadGndVddCorner"], 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"]; enWtA: ROPE _ CoreName.RopeNm["enWA"]; enWtB: ROPE _ CoreName.RopeNm["enWB"]; phA: ROPE _ CoreName.RopeNm["phA"]; phB: ROPE _ CoreName.RopeNm["phB"]; PhA: ROPE _ CoreName.RopeNm["PhA"]; PhB: ROPE _ CoreName.RopeNm["PhB"]; CheckPads: PROC = { TwoCellTypes: TYPE = RECORD[c0, c1: Core.CellType]; IF pads#NIL THEN RETURN; pads _ NEW[ARRAY Side OF ARRAY PadsType OF Core.CellType]; FOR type: PadsType IN PadsType DO name: ROPE _ PadsTypeRp[type]; obj: CD.Object _ PW.Get[IFUCoreCells.libraryPads.design, name.Cat[".mask"]]; obj _ CoreLibrary.FlattenOneLevel[obj].new; pads[top] [type] _ PWCore.FromLayoutWithoutPublic[obj]; IF type=corHi THEN pads[top][type] _ PWCore.RotateCellType[pads[top][type], $Rot270]; pads[left] [type] _ PWCore.RotateCellType[pads[top][type], $Rot90]; pads[bottom] [type] _ PWCore.RotateCellType[pads[top][type], $Rot180]; pads[right] [type] _ PWCore.RotateCellType[pads[top][type], $Rot270]; ENDLOOP; [pads[bottom][corHi], pads[bottom][corLo]] _ TwoCellTypes[pads[bottom][corLo], pads[bottom][corHi]]; [pads[right][corHi], pads[right][corLo]] _ TwoCellTypes[pads[right][corLo], pads[right][corHi]]; FOR type: PadsType IN PadsType DO FOR side: Side IN Side DO sides: CoreBlock.Sides _ CoreFrame.SideSides[side]; cap: CoreBlock.Sides; cap _ SELECT type FROM corLo => CoreBlock.AddSide[sides, CoreFrame.SideSides[CoreFrame.NextSide[side]]], corHi => CoreBlock.AddSide[sides, CoreFrame.SideSides[CoreFrame.PrevSide[side]]], ENDCASE => sides; CoreBlock.MarkSides[pads[side][type], cap]; ENDLOOP; ENDLOOP}; END. ŽIFUCorePadsImpl.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Last Edited by Curry, June 7, 1986 10:22:45 am PDT ʦ˜šœ™Jšœ<™J˜šœ œ œœÏc˜JJšœ&˜&Jšœ+ ˜1Jšœ(  ˜1Jšœ( œ˜3Jš œ( œ œ œ œ œ œ˜LJšœ( œ˜?Jšœ* œ œ˜9Jšœ* ˜DJšœ.˜.Jšœ.˜.Jšœ#˜#Jšœ#˜#Jšœ(˜(Jšœ*˜*—J˜Jšœ œ˜*Jšœ œ˜*Jšœ œ˜*Jšœ œ˜*Jšœœ˜%Jšœœ˜%Jšœœ˜%Jšœœ˜%Jšœ œ˜'Jšœ œ˜*Jšœ œ˜-Jšœ œ˜)Jšœ œ˜*Jšœœ˜'Jšœ œ˜)Jšœœ˜'Jšœœ˜'Jšœœ˜%Jšœœ˜%Jšžœœ˜%Jšžœœ˜%J˜šž œœ˜Jšœœœ˜3Jšœœœœ˜Jš œœœœœ œ˜:šœœ ˜!Jšœœ˜Jšœœ œ9˜LJšœ.˜.Jšœ8˜8šœ ˜JšœD˜D—JšœD˜DJšœF˜FJšœE˜EJšœ˜—šœ,˜,Jšœ7˜7—šœ*˜*Jšœ5˜5—šœœ ˜!šœ œ˜Jšœ3˜3Jšœ˜šœœ˜JšœQ˜QJšœQ˜QJšœ ˜—Jšœ+˜+Jšœ˜—Jšœ˜ ——J˜Jšœ˜J˜—J˜—…—`”