<> <> <> <> <> DIRECTORY CD, CDBasics, CDCells, CDCreateLabels, CDProperties, CDSymbolicObjects, CMos, ImagerFont, PGA144, PW, PWDescr, PWPins, Rope; PGA144Impl: CEDAR PROGRAM IMPORTS CD, CDBasics, CDCells, CDCreateLabels, CDProperties, CDSymbolicObjects, CMos, ImagerFont, PW, PWDescr, PWPins, Rope EXPORTS PGA144 = BEGIN OPEN PGA144; ROPE: TYPE = PW.ROPE; <<-- This generator produces a pad frame for the PGA144, and assigns the power pads automatically>> <<-- Assumptions:>> <<-- We can put at most 36 pins per side, 3 of them being already assigned>> <<-- If we number "1" the first pin on a side, going counter-clockwise (e.g. top pin on left side), then we have 1=(Gnd on left and right, Vdd on top and bottom), 18=PadGnd, and 19=PadVdd.>> <<-- The first pad (Vdd or Gnd) of a side is located in the corner>> <<-- Pads are on a 200 microns minimum pitch, except the power pads which are on a 400 microns pitch and are double-bonded. Corner pads are even wider.>> <<-- The pins expected on pads are the following:>> <> <> <> <<-- Pins will be renamed as follows (aasuming an item kBus)>> <> <> <> <<-- If an item (say kBus) comprises more than one pad, PGA144 will do a renaming of the pins and generate labels as kBus[0].dataIn, kBus[1].dataIn, . . . The index grows with the coordinate, i.e. from left to right and from bottom to top. If the item is composed of only one pad, then no index is added to the name.>> <<>> PadFrame: TYPE = ARRAY[1..144] OF PW.Object; Side: TYPE = PWPins.Side; <<>> <<-- Prepares a pad frame for routing by PWOnion>> MakeOuter: PUBLIC PROC [obj: PW.Object, renameProc: PWPins.RenameProc] RETURNS [cell: PW.Object] = BEGIN height: INT _ CD.InterestSize[IOTristatePad].y-6; -- sniff, sniff: hack!!! CDCells.SetInterestRect[obj, CDBasics.Extend[CD.InterestRect[obj], -height]]; cell _ PWPins.RenamePins[obj, renameProc]; END; <<>> <<-- Build the pad frame>> MakePadFrame: PUBLIC PROC [padDescr: PWDescr.Descriptor, innerSize: CD.Position _ [0, 0], pack: BOOL _ FALSE] RETURNS [frame: PW.Object] = BEGIN pos: CD.Position; dx1, dx2, dy1, dy2: INT; pads: PadFrame; ThePad: PROC [atom: ATOM] RETURNS [obj: PW.Object] = BEGIN obj _ SELECT atom FROM $IOTst => IOTristatePad, $In => InputPad, $Out => OutputPad, $Clock => ClockPad, $Vdd => VddPad, $Gnd => GndPad, $PadVdd => PadVddPad, $PadGnd => PadGndPad, $Empty => EmptyPad, ENDCASE => NIL; END; <<-- Every pin is renamed: "data" -> "Signal[12]", "enableWrite" -> "Signal.enableWrite", and the other pins are just pushed up without renaming.>> font: ImagerFont.Font _ ImagerFont.Find["Xerox/TiogaFonts/Helvetica10B"]; PlaceEachItem: PWDescr.ForEachItemProc = BEGIN seq: PWDescr.PadRef _ NARROW[item.specificRef]; <<-- Place pads in slots, if they are free, and they should be>> side: Side _ IndexToSide[seq[0]]; -- first pin of the item reverse: BOOL _ side=top OR side=left; FOR i: INT IN [0..seq.size) DO index: INT _ IF reverse THEN seq.size-i-1 ELSE i; compositeName: ROPE _ IF seq.size>1 THEN PWPins.Index[item.name, index] ELSE item.name; KeepPin: PWPins.InstanceEnumerator -- [inst: CD.Instance] RETURNS [quit: BOOL _ FALSE] -- = { oldRope: ROPE _ CDSymbolicObjects.GetName[inst]; newApp: CD.Instance; IF Rope.Equal[oldRope, "label"] THEN { name: ROPE _ compositeName; label: PW.Object; posx, posy: INT _ -1; WHILE posx<0 OR posy<0 DO <