DIRECTORY DABasics, CD, CDBasics, CDSymbolicObjects, Convert, Core, CoreClasses, CoreFlat, CoreGeometry, CoreOps, RefTab, RProperties, PW, PWCore, PWPins, RefTabExtras, Rope, RTBasic, RTCoreUtil, RTStructure, TerminalIO; RTStructureImpl: CEDAR PROGRAM IMPORTS CD, CDBasics, CDSymbolicObjects, Convert, CoreClasses, CoreGeometry, CoreOps, RefTab, PW, PWCore, PWPins, RefTabExtras, Rope, RTBasic, RTCoreUtil, RTStructure, TerminalIO EXPORTS RTStructure = BEGIN Error: PUBLIC ERROR[errorType: RTStructure.ErrorType _ callingError, explanation: Rope.ROPE _ NIL] = CODE; Signal: PUBLIC SIGNAL[signalType: RTStructure.ErrorType _ callingError, explanation: Rope.ROPE _ NIL] = CODE; CreateForRopes: PUBLIC PROC [name: Rope.ROPE, nInsts, nObjs, nNets, nPubs: NAT _ 17, netWidth: RTStructure.NetWidthProc _ WidestPinProc, properties: Core.Properties _ NIL] RETURNS [RTStructure.Structure] ~ { RETURN[NEW[RTStructure.StructureRec _ [name: name, instances: RefTab.Create[nInsts, RefTabExtras.EqualRope, RefTabExtras.HashRope], objects: RefTab.Create[nObjs, RefTabExtras.EqualRope, RefTabExtras.HashRope], nets: RefTab.Create[nNets, RefTabExtras.EqualRope, RefTabExtras.HashRope], netWidth: netWidth -- , properties: CoreProperties.CopyProps[properties] -- ]]]}; FetchInstance: PUBLIC PROC [structure: RTStructure.Structure, key: RTStructure.Key] RETURNS [found: BOOLEAN, instance: RTStructure.Instance] ~ { val: REF; [found, val] _ RefTab.Fetch[structure.instances, key]; instance _ NARROW[val]}; FetchInstancePin: PUBLIC PROC [instance: RTStructure.Instance, key: RTStructure.Key] RETURNS [found: BOOLEAN, iPin: RTStructure.InstancePin] ~ { val: REF; [found, val] _ RefTab.Fetch[instance.iPins, key]; iPin _ NARROW[val]}; EnumerateInstances: PUBLIC PROC [structure: RTStructure.Structure, action: RTStructure.EachInstanceAction] RETURNS [quit: BOOLEAN] ~ { Eachpair: RefTab.EachPairAction ~ {instance _ NARROW[val]; quit _ action[key, instance]}; instance: RTStructure.Instance; RETURN[RefTab.Pairs[structure.instances, Eachpair]]}; EnumerateInstancePins: PUBLIC PROC [instance: RTStructure.Instance, action: RTStructure.EachInstancePinAction] RETURNS [quit: BOOLEAN] ~ { Eachpair: RefTab.EachPairAction ~ { instancePin _ NARROW[val]; quit _ action[key, instance, instancePin]}; instancePin: RTStructure.InstancePin; RETURN[RefTab.Pairs[instance.iPins, Eachpair]]}; FetchObject: PUBLIC PROC [structure: RTStructure.Structure, key: RTStructure.Key] RETURNS [found: BOOLEAN, object: RTStructure.Object] ~ { val: REF; [found, val] _ RefTab.Fetch[structure.objects, key]; object _ NARROW[val]}; FetchObjectPin: PUBLIC PROC [object: RTStructure.Object, key: RTStructure.Key] RETURNS [found: BOOLEAN, oPin: RTStructure.ObjectPin] ~ { val: REF; [found, val] _ RefTab.Fetch[object.oPins, key]; oPin _ NARROW[val]}; EnumerateObjects: PUBLIC PROC [structure: RTStructure.Structure, action: RTStructure.EachObjectAction] RETURNS [quit: BOOLEAN] ~ { Eachpair: RefTab.EachPairAction ~ { object _ NARROW[val]; quit _ action[key, object]}; object: RTStructure.Object; RETURN[RefTab.Pairs[structure.objects, Eachpair]]}; EnumerateObjectPins: PUBLIC PROC [object: RTStructure.Object, action: RTStructure.EachObjectPinAction] RETURNS [quit: BOOLEAN] ~ { Eachpair: RefTab.EachPairAction ~ { oPin _ NARROW[val]; quit _ action[key, object, oPin]}; oPin: RTStructure.ObjectPin; RETURN[RefTab.Pairs[object.oPins, Eachpair]]}; EnumeratePhysicalPins: PUBLIC PROC [oPin: RTStructure.ObjectPin, action: RTStructure.EachPhysicalPinAction] RETURNS [quit: BOOLEAN _ FALSE] ~ { FOR list: LIST OF RTStructure.PhysicalPin _ oPin.physicalPins, list.rest WHILE list # NIL AND ~quit DO quit _ action[oPin, list.first] ENDLOOP; }; PosOfObjectPin: PUBLIC PROC [object: RTStructure.Object, pPin: RTStructure.PhysicalPin] RETURNS [position: DABasics.Position] ~ { position _ SELECT pPin.side FROM bottom => [pPin.range.min, 0], right => [CD.InterestSize[object.cdObject].x, pPin.range.min], top => [pPin.range.min, CD.InterestSize[object.cdObject].y], left => [0, pPin.range.min], ENDCASE => [0, 0]}; FetchNet: PUBLIC PROC [structure: RTStructure.Structure, key: RTStructure.Key] RETURNS [found: BOOLEAN, net: RTStructure.Net] ~ { val: REF; [found, val] _ RefTab.Fetch[structure.nets, key]; net _ NARROW[val]}; FetchNetPin: PUBLIC PROC [net: RTStructure.Net, key: RTStructure.Key] RETURNS [found: BOOLEAN, nPin: RTStructure.NetPin] ~ { val: REF; [found, val] _ RefTab.Fetch[net.nPins, key]; nPin _ NARROW[val]}; EnumerateNets: PUBLIC PROC [structure: RTStructure.Structure, action: RTStructure.EachNetAction] RETURNS [quit: BOOLEAN] ~ { eachPair: RefTab.EachPairAction ~ { net _ NARROW[val]; quit _ action[key, net]}; net: RTStructure.Net; RETURN[RefTab.Pairs[structure.nets, eachPair]]}; EnumerateNetPins: PUBLIC PROC [net: RTStructure.Net, action: RTStructure.EachNetPinAction] RETURNS [quit: BOOLEAN] ~ { eachPair: RefTab.EachPairAction ~ { nPin _ NARROW[val]; quit _ action[key, net, nPin]}; nPin: RTStructure.NetPin; RETURN[RefTab.Pairs[net.nPins, eachPair]]}; WidestPinProc: PUBLIC RTStructure.NetWidthProc ~ { EachNetPin: RTStructure.EachNetPinAction ~ { EachPhysicalPin: RTStructure.EachPhysicalPinAction ~ { wireWidth _ MAX[wireWidth, pPin.range.max - pPin.range.min]}; [] _ EnumeratePhysicalPins[nPin.oPin, EachPhysicalPin]}; wireWidth _ 0; [] _ EnumerateNetPins[net, EachNetPin]}; IsPublic: PUBLIC PROC [net: RTStructure.Net] RETURNS [isPublic: BOOLEAN] ~ { EachNetPin: RTStructure.EachNetPinAction ~ { quit _ nPin.instance.object.heirarchyLevel = nextHigher}; isPublic _ EnumerateNetPins[net, EachNetPin]}; CreateFromCore: PUBLIC PROC [root: Core.CellType, flattenCellType: RTCoreUtil.FlattenCellTypeProc, instanceName: RTStructure.InstanceName, wireName: RTStructure.WireName, interestingProperties: RTCoreUtil.PropertyKeys, decoration: CoreGeometry.Decoration, libDesign: CD.Design, properties: Core.Properties] RETURNS [ structure: RTStructure.Structure] ~ { InternalWireProc: RTCoreUtil.FlatWireProc = { pathName: Rope.ROPE _ wireName[root, flatWire]; net: RTStructure.Net _ NEW[RTStructure.NetRec _ [name: pathName, nPins: RefTab.Create[], properties: RTCoreUtil.CopyProps[flatWire.wire.properties, interestingProperties]]]; [] _ RTStructure.StoreNet[structure, pathName, net]}; ExternalWireProc: RTCoreUtil.FlatWireProc = { pathName: Rope.ROPE _ wireName[root, flatWire]; objectPin: RTStructure.ObjectPin _ NEW[RTStructure.ObjectPinRec _ [name: pathName, heirarchyLevel: nextHigher, properties: RTCoreUtil.CopyProps[flatWire.wire.properties, interestingProperties]]]; netPin: RTStructure.NetPin _ NEW[RTStructure.NetPinRec _ [oPin: objectPin, instance: structure.outerInstance]]; net: RTStructure.Net _ FetchNet[structure, pathName].net; instancePin: RTStructure.InstancePin _ NEW[RTStructure.InstancePinRec _ [oPin: objectPin, net: net]]; [] _ RTStructure.StoreObjectPin[structure.outerInstance.object, pathName, objectPin]; [] _ RTStructure.StoreInstancePin[structure.outerInstance, pathName, instancePin]; [] _ RTStructure.StoreNetPin[net, pathName, netPin]}; InstanceProc: RTCoreUtil.FlatInstanceProc = { EachPublic: PROC [publicWire: Core.Wire] = { EachObjectPin: RTStructure.EachObjectPinAction ~ { -- PROC [key: Key, object: Object, oPin: ObjectPin] RETURNS [quit: BOOLEAN _ FALSE]; IF Rope.Equal[oPin.name, name] THEN { IF net # NIL THEN { netPin: RTStructure.NetPin _ NEW[RTStructure.NetPinRec _ [oPin: oPin, instance: instance]]; instancePin: RTStructure.InstancePin _ NEW[RTStructure.InstancePinRec _ [oPin: oPin, net: net]]; [] _ RTStructure.StoreInstancePin[instance, Rope.Cat[name, oPin.name], instancePin]; [] _ RTStructure.StoreNetPin[net, Rope.Cat[instance.name, oPin.name], netPin]}}}; flatWire: CoreFlat.FlatWire _ NARROW [RefTab.Fetch[bindings, publicWire].val]; name: Rope.ROPE _ wireName[root, flatWire^]; net: RTStructure.Net _ FetchNet[structure, flatWire.wire].net; IF net = NIL THEN Signal[callingError, Rope.Cat[Rope.Cat["Net not defined: ", name, " on component: ", instance.name], Rope.Cat[", type: ", object.name]]]; [] _ EnumerateObjectPins[object, EachObjectPin]}; -- get the pin instName: Rope.ROPE _ instanceName[root, flatCellType]; object: RTStructure.Object _ DefineObject[structure, cell, interestingProperties, decoration, libDesign]; instance: RTStructure.Instance _ DefineInstance[structure, object, instName, properties, interestingProperties]; CoreOps.VisitRootAtomics[cell.public, EachPublic]}; outerName: Rope.ROPE _ CoreOps.GetCellTypeName[root]; outerObject: RTStructure.Object _ NEW[RTStructure.ObjectRec _ [name: outerName, cdObject: NIL, heirarchyLevel: nextHigher, oPins: RefTab.Create[], properties: RTCoreUtil.CopyProps[root.properties, interestingProperties]]]; outerInstance: RTStructure.Instance _ NEW[RTStructure.InstanceRec _ [name: outerName, object: outerObject, iPins: RefTab.Create[]]]; outerCoreInstance: CoreClasses.CellInstance _ CoreClasses.CreateInstance[NIL, root]; structure _ CreateForRopes[name: outerName]; [] _ RTStructure.StoreInstance[structure, outerName, outerInstance]; [] _ RTStructure.StoreObject[structure, outerName, outerObject]; structure.outerInstance _ outerInstance; TerminalIO.PutRope["Getting structure description . . .\n"]; RTCoreUtil.Flatten[root, flattenCellType, ExternalWireProc, InternalWireProc, InstanceProc, interestingProperties]}; InsertPublic: PUBLIC PROC [structure: RTStructure.Structure, name: Rope.ROPE, cdObject: CD.Object, pinFilter: RTStructure.CDPinFilterProc, userData: REF ANY, makeHashKey: RTStructure.HashKeyProc] ~ { }; InsertInstance: PUBLIC PROC [structure: RTStructure.Structure, name: Rope.ROPE, position: DABasics.Position, orientation: DABasics.Orientation, cdObject: CD.Object, pinFilter: RTStructure.CDPinFilterProc, userData: REF ANY, makeHashKey: RTStructure.HashKeyProc] ~ { EachInstPin: CDSymbolicObjects.InstEnumerator = { usePin: BOOLEAN _ IF pinFilter = NIL THEN TRUE ELSE pinFilter[inst, cdObject, userData]; IF usePin THEN { InsertInstPin[structure, object, instance, inst, makeHashKey]}}; EachObjPin: CDSymbolicObjects.InstEnumerator = { usePin: BOOLEAN _ IF pinFilter = NIL THEN TRUE ELSE pinFilter[inst, cdObject, userData]; IF usePin THEN { InsertObjectPin[structure, object, cdObject, inst, makeHashKey]}}; object: RTStructure.Object; instance: RTStructure.Instance; IF cdObject # NIL THEN { objectName: Rope.ROPE _ RTBasic.GetCDCellName[cdObject]; object _ FetchObject[structure, objectName].object; IF object = NIL THEN { object _ NEW[RTStructure.ObjectRec _ [objectName, cdObject, this, RefTab.Create[equal: RefTabExtras.EqualRope, hash: RefTabExtras.HashRope] -- , properties: CoreProperties.CopyProps[cdObject.properties] -- ]]; [] _ RTStructure.StoreObject[structure, objectName, object]; [] _ PWPins.EnumerateEdgePins[cdObject, EachObjPin]}; instance _ NEW[RTStructure.InstanceRec _ [name, TRUE, position, orientation, object, RefTab.Create[equal: RefTabExtras.EqualRope, hash: RefTabExtras.HashRope]]]; [] _ RTStructure.StoreInstance[structure, name, instance]; [] _ PWPins.EnumerateEdgePins[cdObject, EachInstPin]}}; PrintStructure: PUBLIC PROC [structure: RTStructure.Structure] ~ { TerminalIO.PutRopes["Writing structure for: ", structure.name, "\n"]; TerminalIO.PutRope[" Objects\n"]; [] _ EnumerateObjects[structure, PrintObject]; TerminalIO.PutRope[" Instances\n"]; [] _ EnumerateInstances[structure, PrintInstance]; TerminalIO.PutRope[" Nets\n"]; [] _ EnumerateNets[structure, PrintNet]}; InsertInstPin: PROC [structure: RTStructure.Structure, object: RTStructure.Object, instance: RTStructure.Instance, pin: CD.Instance, makeHashKey: RTStructure.HashKeyProc] ~ { netPin: RTStructure.NetPin; instancePin: RTStructure.InstancePin; pinName: Rope.ROPE _ CDSymbolicObjects.GetName[pin]; tabIndex: Rope.ROPE _ IF makeHashKey=NIL THEN pinName ELSE makeHashKey[pin]; netPinName: Rope.ROPE _ Rope.Cat[tabIndex, "/", instance.name]; rect: CD.Rect _ CDSymbolicObjects.Denotes[pin]; objectPin: RTStructure.ObjectPin _ FetchObjectPin[object, tabIndex].oPin; net: RTStructure.Net _ FetchNet[structure, tabIndex].net; IF net = NIL THEN { net _ NEW[RTStructure.NetRec _ [name: tabIndex, nPins: RefTab.Create[equal: RefTabExtras.EqualRope, hash: RefTabExtras.HashRope]]]; [] _ RTStructure.StoreNet[structure, tabIndex, net]}; netPin _ NEW[RTStructure.NetPinRec _ [oPin: objectPin, instance: instance]]; instancePin _ NEW[RTStructure.InstancePinRec _ [oPin: objectPin, net: net]]; [] _ RTStructure.StoreInstancePin[instance, netPinName, instancePin]; [] _ RTStructure.StoreNetPin[net, netPinName, netPin]}; InsertObjectPin: PROC [structure: RTStructure.Structure, object: RTStructure.Object, cdObject: CD.Object, pin: CD.Instance, makeHashKey: RTStructure.HashKeyProc] ~ { physicalPin: RTStructure.PhysicalPin; pinName: Rope.ROPE _ CDSymbolicObjects.GetName[pin]; tabIndex: Rope.ROPE _ IF makeHashKey=NIL THEN pinName ELSE makeHashKey[pin]; side: RTBasic.Side _ FromSideToSide[PWPins.GetSide[cdObject, pin].side]; outsideRect: CD.Rect _ CD.InterestRect[cdObject]; pinRect: CD.Rect _ CDSymbolicObjects.Denotes[pin]; depth: INT _ SELECT side FROM bottom => pinRect.y1 - outsideRect.y1, right => outsideRect.x2 - pinRect.x2, top => outsideRect.y2 - pinRect.y2, left => pinRect.x1 - outsideRect.x1, ENDCASE => Error[programmingError, "Call maintainer"]; objectPin: RTStructure.ObjectPin _ FetchObjectPin[object, tabIndex].oPin; IF objectPin = NIL THEN { objectPin _ NEW[RTStructure.ObjectPinRec _ [name: tabIndex, heirarchyLevel: this -- , properties: CoreProperties.CopyProps[pin.properties] -- ]]; [] _ RTStructure.StoreObjectPin[object, tabIndex, objectPin]}; physicalPin _ NEW[RTStructure.PhysicalPinRec _ [range: CoordsAlongSide[pin, cdObject, side], side: side, layer: CDSymbolicObjects.GetLayer[pin], depth: depth -- , properties: CoreProperties.CopyProps[pin.properties] -- ]]; RTStructure.StorePhysicalPin[objectPin, physicalPin]}; CoordsAlongSide: PUBLIC PROC [instance: CD.Instance, object: CD.Object, side: RTBasic.Side] RETURNS [range: RTStructure.Range] ~ { pos: DABasics.Position _ instance.trans.off; size: DABasics.Position _ CDBasics.SizeOfRect[CDSymbolicObjects.Denotes[instance]]; SELECT side FROM top, bottom => range _ [pos.x, pos.x + size.x]; left, right => range _ [pos.y, pos.y + size.y]; ENDCASE}; FromSideToSide: PUBLIC PROC [side: PWPins.Side] RETURNS [routeSide: RTBasic.Side] = { routeSide _ SELECT side FROM left => left, right => right, top => top, bottom => bottom, ENDCASE => ERROR}; DefineObject: PROC [structure: RTStructure.Structure, cellType: Core.CellType, interestingProperties: RTCoreUtil.PropertyKeys, decoration: CoreGeometry.Decoration, libDesign: CD.Design] RETURNS [object: RTStructure.Object] = { EachWire: PROC [wire: Core.Wire] ~ { name: Rope.ROPE _ CoreOps.GetShortWireName[wire]; objectPin: RTStructure.ObjectPin _ NEW[RTStructure.ObjectPinRec _ [name: name, heirarchyLevel: this -- , properties: CoreProperties.CopyProps[wire.properties] -- ]]; [] _ RTStructure.StoreObjectPin[object, wire, objectPin]}; EachPhysicalPin: CoreGeometry.EachWirePinProc = { rtSide: RTBasic.Side _ SELECT side FROM bottom => bottom, right => right, top => top, left => left, ENDCASE => RTBasic.Error[programmingError, "Not suppose to happen."]; range: RTStructure.Range _ [min, max]; depth: INT _ 0; physicalPin: RTStructure.PhysicalPin _ NEW[RTStructure.PhysicalPinRec _ [range: range, side: rtSide, layer: layer, depth: depth, properties: RTCoreUtil.CopyProps[wire.properties, interestingProperties]]]; objectPin: RTStructure.ObjectPin _ FetchObjectPin[object, wire].oPin; RTStructure.StorePhysicalPin[objectPin, physicalPin]}; cdObject: CD.Object _ NIL; object _ FetchObject[structure, cellType].object; IF object = NIL THEN { objectName: Rope.ROPE _ CoreOps.GetCellTypeName[cellType]; IF PWCore.GetLayoutAtom[cellType] # NIL THEN cdObject _ PWCore.Layout[cellType] ELSE IF libDesign # NIL THEN cdObject _ PW.Get[libDesign, objectName] ELSE { Signal[callingError, Rope.Cat["Core object: ", objectName, " not in found"]]; RETURN}; IF cdObject = NIL THEN { Signal[callingError, Rope.Cat["Core object: ", objectName, " not in found"]]; RETURN}; object _ NEW[RTStructure.ObjectRec _ [name: objectName, cdObject: cdObject, heirarchyLevel: this, oPins: RefTab.Create[], properties: RTCoreUtil.CopyProps[cellType.properties, interestingProperties]]]; [] _ RTStructure.StoreObject[structure, objectName, object]; CoreOps.VisitRootAtomics[cellType.public, EachWire]; [] _ CoreGeometry.EnumerateNonOverlappingSides[decoration, cellType, EachPhysicalPin]}}; DefineInstance: PROC [structure: RTStructure.Structure, object: RTStructure.Object, name: Rope.ROPE, properties: Core.Properties, interestingProperties: RTCoreUtil.PropertyKeys] RETURNS [instance: RTStructure.Instance] = { instance _ NEW[RTStructure.InstanceRec _ [name: name, object: object, iPins: RefTab.Create[] , properties: RTCoreUtil.CopyProps[properties, interestingProperties]]]; [] _ RTStructure.StoreInstance[structure, name, instance]}; PrintObject: RTStructure.EachObjectAction ~ { PrintObjectPins: RTStructure.EachObjectPinAction ~ { PrintPhysicalPins: RTStructure.EachPhysicalPinAction ~ { TerminalIO.PutRope[Rope.Cat[" range: [", Convert.RopeFromInt[pPin.range.min], ", ", Convert.RopeFromInt[pPin.range.max], "], "]]; TerminalIO.PutRope[Rope.Cat["side: ", RTBasic.sideName[pPin.side], "\n"]]}; TerminalIO.PutRope[Rope.Cat[" ", oPin.name, IF object.heirarchyLevel = this THEN " this" ELSE " nextHigher"]]; [] _ EnumeratePhysicalPins[oPin, PrintPhysicalPins]}; TerminalIO.PutRope[Rope.Cat[" ", object.name, IF object.heirarchyLevel = this THEN " this" ELSE " nextHigher", "\n"]]; TerminalIO.PutRope[Rope.Cat[" connections: ", "\n"]]; [] _ EnumerateObjectPins[object, PrintObjectPins]}; PrintInstance: RTStructure.EachInstanceAction ~ { PrintInstancePins: RTStructure.EachInstancePinAction ~ { TerminalIO.PutRope[Rope.Cat[" net: ", iPin.net.name, ", pin: ", iPin.oPin.name, "\n"]]; }; TerminalIO.PutRope[Rope.Cat[" ", instance.name, "\n"]]; TerminalIO.PutRope[Rope.Cat[" position: [", Convert.RopeFromInt[instance.position.x], ", ", Convert.RopeFromInt[instance.position.y], "], \n"]]; TerminalIO.PutRope[Rope.Cat[" object: ", instance.object.name, "\n"]]; TerminalIO.PutRope[Rope.Cat[" connections: ", "\n"]]; [] _ EnumerateInstancePins[instance, PrintInstancePins]}; PrintNet: RTStructure.EachNetAction ~ { PrintNetPins: RTStructure.EachNetPinAction ~ { TerminalIO.PutRope[Rope.Cat[" instance: ", nPin.instance.name, ", pin: ", nPin.oPin.name, "\n"]]; }; TerminalIO.PutRope[Rope.Cat[" ", net.name, "\n"]]; TerminalIO.PutRope[Rope.Cat[" connections: ", "\n"]]; [] _ EnumerateNetPins[net, PrintNetPins]}; TranslateRange: PUBLIC PROC [instance: RTStructure.Instance, pPin: RTStructure.PhysicalPin] RETURNS [range: RTStructure.Range]~ { range _ SELECT pPin.side FROM top, bottom => [instance.position.x + pPin.range.min, instance.position.x + pPin.range.max], left, right => [instance.position.y + pPin.range.min, instance.position.y + pPin.range.max], ENDCASE => RTBasic.Error[programmingError, "Call maintainer."]; }; END. RTStructureImpl.mesa Copyright c 1986 by Xerox Corporation. All rights reversed. Created by Bryan Preas, August 22, 1986 3:20:09 pm PDT Bertrand Preas April 3, 1987 1:11:37 pm PST Errors Building and Using The Structure Table Creating The Structure Table Creates new structure for Rope keys. Instance Manipulation looks up key in table, returns associated instance (if any) if found is TRUE, net is value associated with given key if found is FALSE, instance is NIL looks up key in table, returns associated instancePin (if any) if found is TRUE, net is value associated with given key if found is FALSE, instancePin is NIL enumerates objects currently in symbol table in unspecified order instances inserted/deleted during enumeration may or may not be seen applies action to each object until action returns TRUE or no more pairs returns TRUE if some action returns TRUE enumerates pins on instance in unspecified order pins inserted/deleted during enumeration may or may not be seen applies action to each pin until action returns TRUE or no more pins returns TRUE if some action returns TRUE Object Manipulation looks up key in table, returns associated object (if any) if found is TRUE, net is value associated with given key if found is FALSE, net is NIL looks up key in table, returns associated objectPin (if any) if found is TRUE, net is value associated with given key if found is FALSE, objectPin is NIL enumerates objects currently in symbol table in unspecified order instances inserted/deleted during enumeration may or may not be seen applies action to each object until action returns TRUE or no more pairs returns TRUE if some action returns TRUE enumerates pins on object in unspecified order pins inserted/deleted during enumeration may or may not be seen applies action to each segment until action returns TRUE or no more segments returns TRUE if some action returns TRUE enumerates physical pins on ObjectPin in unspecified order pins inserted/deleted during enumeration may or may not be seen applies action to each segment until action returns TRUE or no more object pins returns TRUE if some action returns TRUE returns position of object Pin wrt the object Net Manipulation looks up key in table, returns associated net (if any) if found is TRUE, net is value associated with given key if found is FALSE, net is NIL looks up key in table, returns associated netPin (if any) if found is TRUE, net is value associated with given key if found is FALSE, netPin is NIL enumerates nets currently in symbol table in unspecified order nets inserted/deleted during enumeration may or may not be seen applies action to each net until action returns TRUE or no more nets returns TRUE if some action returns TRUE enumerates pins on net in unspecified order pins inserted/deleted during enumeration may or may not be seen applies action to each pin until action returns TRUE or no more pins returns TRUE if some action returns TRUE PROC[net: Net, structure: Structure, direction: RTBasic.Direction, context: REF ANY _ NIL] RETURNS [wireWidth: INT] PROC [key: Key, net: Net, nPin: NetPin] RETURNS [quit: BOOLEAN _ FALSE]; PROC [oPin: ObjectPin, pPin: PhysicalPin] RETURNS [quit: BOOLEAN _ FALSE]; TRUE iff this tet has a connection to the next higher level PROC [key: Key, net: Net, nPin: NetPin] RETURNS [quit: BOOLEAN _ FALSE]; Utilities derive the interconnection requirements from a Core data structure. structure is indexed by the following REFs: instances: Core cellInstance of flattened object instancePins: Core public wires on associated object objects: Core cellType objectPins: Core public wires on associated object nets: Core actual wires of flattened object netPins: PROC [flatWire: CoreFlat.FlatWireRec] RETURNS [quit: BOOL _ FALSE] register the net using internal wire PROC [flatWire: CoreFlat.FlatWireRec] RETURNS [quit: BOOL _ FALSE] build and insert the external object pins from the public wire PROC [flatCellType: CoreFlat.FlatCellTypeRec, cell: Core.CellType, bindings: CoreFlat.Bindings, properties: Core.Properties] RETURNS [quit: BOOL _ FALSE]; add connection for comp, pin construct an instance, an object and put the pins on the interest rec of the object in the structure if pinFilter returns true. makeHashKey can be used to transform the pin names to net names. Ropes are use for keys; this means that CreateForRopes must be used to create the structure used by theis procedure. In addition, the obhect and pins must be named. construct an instance, an object and put the pins on the interest rec of the object in the structure if pinFilter returns true. makeHashKey can be used to transform the pin names to net names. Ropes are use for keys; this means that CreateForRopes must be used to create the structure used by theis procedure. In addition, the obhect and pins must be named. [inst: CD.Instance] RETURNS [quit: BOOL _ FALSE] [inst: CD.Instance] RETURNS [quit: BOOL _ FALSE] print the given structure Internal Procedures make a segment from a pin (inst) on an object and put it in the table make an object pin from pin (inst) on an object and put it in the table construct object pins for this object bind pin to public wire of object PROC [wire: Wire, min, max: INT, side: Side, layer: CD.Layer] RETURNS [quit: BOOL _ FALSE]; get the ChipNDale object define the object define the pins on the object find range of an instance pin ÊP˜– "Cedar" stylešœ™Jšœ Ïmœ1™™>Kšœ žœ(™8Kšœ žœž™%K˜Kšœžœ˜ Kšœ1˜1Kšœžœ˜K˜—š ŸœžœžœLžœžœ˜†KšœA™AKšœD™DKšœ3žœ™HKšœžœž™(—˜Kšœ.žœ%˜YKšœ˜Kšžœ/˜5K˜—š ŸœžœžœMžœžœ˜ŠKšœ0™0Kšœ?™?Kšœ0žœ™DKšœžœž™(—˜šœ#˜#Kšœžœ2˜F—Kšœ%˜%Kšžœ*˜0K˜—L™š Ÿ œžœžœ:žœ žœ!˜ŠKšœ9™9Kšœ žœ(™8Kšœ žœ ž™K˜Kšœžœ˜ Kšœ4˜4Kšœ žœ˜K˜—š Ÿœžœžœ4žœ žœ"˜ˆKšœ<™Kšœžœ"˜™>Kšœ?™?Kšœ0žœ™DKšœžœž™(—˜šœ#˜#Kšœžœ˜Kšœ˜—Kšœ˜Kšžœ*˜0K˜—š Ÿœžœžœ>žœžœ˜vKšœ+™+Kšœ?™?Kšœ0žœ™DKšœžœž™(—™šœ#˜#Kšœžœ˜Kšœ˜—Kšœ˜Kšžœ%˜+K˜—šŸ œžœ˜2Kš žœHžœžœžœžœ žœ™sK˜šŸ œ"˜,Kšžœ$žœžœžœ™HK˜šŸœ'˜6Kšžœ&žœžœžœ™JKšœ žœ.˜=K˜—Kšœ8˜8K˜—Kšœ˜Kšœ(˜(K˜—š Ÿœžœžœžœ žœ˜Lšžœ7™;K˜—šŸ œ"˜,Kšžœ$žœžœžœ™HKšœ9˜9K˜—Kšœ.˜.——™ š Ÿœžœžœðžœ&žœ(˜âKšœC™C™+šœ0™0K™4—šœ™K™3—™+K™ ——K™šŸœ˜-Kšžœ"žœžœžœ™BK˜Kšœ$™$Kšœžœ˜/Kšœžœ“˜®šœ5˜5K˜——šŸœ˜-Kšžœ"žœžœžœ™BK˜Kšœ>™>Kšœžœ˜/Kšœ#žœ˜ÃKšœžœO˜oKšœ9˜9Kšœ'žœ;˜eKšœU˜UKšœR˜RKšœ5˜5K˜—šŸ œ!˜-Kšžœyžœžœžœ™šK™šŸ œžœ˜,K˜šŸ œ%˜2Kš œžœ-žœžœžœ˜Tšžœžœ˜%šžœžœžœ˜Kšœ™Kšœžœ;˜[Kšœ'žœ6˜`KšœT˜TKšœQ˜Q——K˜—Kšœžœ*˜NKšœ žœ˜-Kšœ>˜>šžœžœž˜Kšœ‹˜‹—šœ2 ˜@K˜——Kšœžœ$˜7Kšœi˜iKšœp˜pšœ3˜3K˜——Kšœžœ!˜5Kšœ"žœ5žœ˜ÞKšœ&žœ[˜„KšœIžœ˜TKšœ,˜,KšœD˜DKšœ@˜@Kšœ(˜(K˜K˜˜>—Kšœžœ <œ˜ÞKšœ6˜6K˜—š Ÿœžœžœ žœžœžœ˜‚Kšœžœ˜,Kšœžœ<˜Sšžœž˜K˜/K˜/Kšžœ˜ ——K˜–[]šŸœžœžœžœ˜Ušœ žœž˜K˜ Kšœ˜Kšœ ˜ Kšœ˜Kšžœžœ˜—K˜—–[]šŸ œžœžœ žœ!˜âK˜šŸœžœ˜$Kšœ%™%K˜Kšœ žœ#˜2Kšœ#žœ> =œ˜¥Kšœ:˜:K˜—šŸœ"˜1Kšœ!™!Kš žœžœžœžœžœžœ™[K˜šœžœž˜'Kšœ;˜;Kšžœ>˜E—Kšœ&˜&Kšœžœ˜Kšœ(žœ¢˜ÍKšœE˜EKšœ6˜6K˜—Kšœ žœ žœ˜Kšœ1˜1šžœ žœžœ˜Kšœžœ%˜:K˜Kšœ™Kšžœ"žœžœ$˜PKš žœžœ žœžœ žœ˜Ešžœ˜KšœM˜MKšžœ˜—šžœ žœžœ˜KšœM˜MKšžœ˜K˜—Kšœ™Kšœ žœ½˜ÉKšœ<˜