DIRECTORY Atom, CD, CDSimpleRules, Core, CoreGeometry, CoreRouteFlat, DABasics, FS, GC, GCPrivate, IP, IPBasicOps, IPCoTab, IPTop, Process, Rope, Route, RouteDiGraph; GCImpl: CEDAR PROGRAM IMPORTS CD, CDSimpleRules, GCPrivate, IPBasicOps, IPCoTab, IPTop, Process, Route, RouteDiGraph EXPORTS GC = BEGIN Error: PUBLIC ERROR [errorType: GC.ErrorType _ callingError, explanation: Rope.ROPE _ NIL] = CODE; Signal: PUBLIC SIGNAL [signalType: GC.ErrorType _ callingError, explanation: Rope.ROPE _ NIL] = CODE; CreateDesignRules: PUBLIC PROC [technologyKey: ATOM, rulesKey: ATOM, horizLayer, vertLayer: Rope.ROPE] RETURNS [designRules: GC.DesignRules] = { hLayer: CD.Layer _ CDSimpleRules.GetLayer[technologyKey, horizLayer]; vLayer: CD.Layer _ CDSimpleRules.GetLayer[technologyKey, vertLayer]; technology: CD.Technology _ CD.FetchTechnology[technologyKey]; designRules _ NEW[GC.DesignRulesRec _ [ horizLayer: horizLayer, vertLayer: vertLayer, horizParams: Route.DefaultDesignRulesParameters [technology, hLayer, vLayer, horizontal], --?used to use rulesKey as arg[-1] vertParams: Route.DefaultDesignRulesParameters [technology, hLayer, vLayer, vertical], --?used to use rulesKey as arg[-1] technology: technology]]; designRules.horizRules _ Route.DefaultDesignRules[designRules.horizParams]; --?rulesKey designRules.vertRules _ Route.DefaultDesignRules[designRules.vertParams]}; --?rulesKey defaultParms: PUBLIC GC.Parms _ NEW[GC.ParmsRec]; CreateContext: PUBLIC PROC [name: Rope.ROPE _ NIL, structure: CoreRouteFlat.Structure, designRules: GC.DesignRules, parms: GC.Parms] RETURNS [context: GC.Context] = { contextName: Rope.ROPE _ IF name # NIL THEN name ELSE structure.name; topology: IPTop.Ref _ IPTop.ReDefineChs [top: IPTop.CreateFromStructure[structure], maxChWidth: TRUE]; SetIPComps[structure, topology]; IPTop.Geometrize[topology]; context _ NEW[GC.ContextRec _ [name: contextName, rules: designRules, structure: structure, parms: parms, topology: topology, topologicalOrder: NIL]]}; DoInitialGlobalRoute: PUBLIC PROC [context: GC.Context] = { p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; GCPrivate.DoInitialGlobalRoute[context]; Process.SetPriority[p]}; DoImproveGlobalRoute: PUBLIC PROC [context: GC.Context] = { p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; Process.SetPriority[p]}; DoDetailRoute: PUBLIC PROC [context: GC.Context] RETURNS [result: GC.Result] = { p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; result _ GCPrivate.DoDetailRoute[context]; Process.SetPriority[p]}; InitialPlace: PUBLIC PROC [structure: CoreRouteFlat.Structure] ~ { FOR insts: LIST OF CoreRouteFlat.Instance _ structure.instances, insts.rest WHILE insts#NIL DO insts.first.placed _ TRUE ENDLOOP}; SetIPComps: PROC[structure: CoreRouteFlat.Structure, topology: IPTop.Ref] ~ { FOR insts: LIST OF CoreRouteFlat.Instance _ structure.instances, insts.rest WHILE insts#NIL DO IF insts.first#structure.outerInstance THEN { co: IPCoTab.Component _ IPCoTab.GetComponent[topology.coTab, insts.first.name]; size: IP.IntVector _ CD.InterestSize[insts.first.layObject]; shapeRec: REF IP.ShapeRep _ NEW[IP.ShapeRep _ [dim: IPBasicOps.NuNatVector[size.x, size.y]]]; co.shape _ shapeRec^} ENDLOOP}; Destroy: PUBLIC PROC [context: GC.Context] ~ { DestroyNode: RouteDiGraph.EnumNodeProc = { channel: GCPrivate.Channel _ NARROW[node.nodeInfo]; channel.topoOrder _ NIL}; IPTop.DestroySelf[NARROW[context.topology]]; RouteDiGraph.DestroyGraph[graph: NARROW[context.topologicalOrder], enumNode: DestroyNode]; GCPrivate.DestroyChannels[context]}; metalVerticalRules: PUBLIC GC.DesignRules _ CreateDesignRules[$cmosB, $Hybrid, "metal2", "metal"]; metalHorizontalRules: PUBLIC GC.DesignRules _ CreateDesignRules[$cmosB, $Hybrid, "metal", "metal2"]; interestingProperties: PUBLIC LIST OF ATOM _ NIL; -- props interesting to GC END. ¶GCImpl.mesa Copyright Ó 1986, 1987 by Xerox Corporation. All rights reserved. Bryan Preas, September 16, 1987 4:26:06 pm PDT Massoud Pedram November 9, 1987 12:52:51 pm PST Don Curry December 7, 1987 11:27:08 am PST Errors Design Rules Define the general cell design rules. technologyKey values must correspond to one of the ChipNDale technologies. horizLayer, vertLayer should be "poly", "metal" or "metal2". General Cell Context and Result Create a General Cell context. The General Cell context definition includes the design rules (conductor and via widths and spacings) for the routing channels as well as the circuit structure definition. SetIPTypes[structure, topology]; Determine strategic paths for the wiring among the cells. Determine strategic paths for the wiring among the cells. Determine actual wiring paths. SetIPTypes: PROC[structure: CoreRouteFlat.Structure, topology: IPTop.Ref] ~ { EachTypeProc: CoreRouteFlat.EachObjectAction ~ { IF object.heirarchyLevel = this THEN { type: IPTypeTab.CoType _ IPTypeTab.FetchCoType[topology.types, object.name]; size: IP.IntVector _ CD.InterestSize[object.layObject]; shapeRec: REF IP.ShapeRep _ NEW[IP.ShapeRep _ [dim: IPBasicOps.NuNatVector[size.x, size.y]]]; type.shapeInfo _ [shapeRec, NIL, NIL]; }; }; --EachTypeProc [] _ CoreRouteFlat.EnumerateObjects[structure, EachTypeProc]; }; --SetIPTypes Clean Up Remove circular references so garbage collection can work Global Frame Variables Êý˜šœ ™ JšœB™BJšœ+Ïkœ™/Jšœ,™/Jšœ*™*J˜—š ˜ Jš œœ>œœ œA˜œJ˜—šÐbnœœœ˜JšœœT˜^Jšœœ˜—head™šÏnœœ˜Jš œ œ-œœœ˜N—šŸœœ˜Jš œ œ-œœœ˜O——™ šŸœœœœ œœœœ˜Jšœ®™®Jšœœ;˜EJšœœ:˜DJšœ œœ ˜>šœœœ˜'Jšœ˜Jšœ˜šœ/˜/JšœL˜L—šœ.˜.JšœK˜K—Jšœ˜—JšœW˜WJšœW˜W——™š œœœ œœ ˜1J˜—šŸ œœœ œœ3œœœ œ ˜¦JšœË™ËJš œœœœœœ˜Fšœ)˜)Jšœ8œ˜>—Jšœ ™ Jšœ ˜ Jšœ˜Jšœ œœ€œ˜—J˜—šŸœœœ œ ˜;J™9J™Jšœ,˜,Jšœ0˜0Jšœ(˜(Jšœ˜J˜—šŸœœœ œ ˜;J™9Jšœ,˜,Jšœ0˜0Jšœ˜J˜—š Ÿ œœœ œ œ œ ˜PJšœ ™ Jšœ,˜,Jšœ0˜0Jšœ*˜*Jšœ˜J˜—šŸ œœœ)˜BJšœœœ:œœœœœ˜ƒJ˜—šŸ œœ=™MšŸ œ$™0šœœ™&JšœL™LJšœœ œ ™7Jš œ œœ œœ;™]Jšœœœ™&Jšœ™—JšœÏc™—J™Jšœ=™=Jšœ  ™J™—šŸ œœ=˜Mš œœœ:œœ˜^šœ%œ˜-JšœP˜PJšœœœ%˜>š œ œœ œœ ˜-Jšœ/˜/—Jšœœ˜————™šŸœœœ œ ˜.Jšœ9™9šŸ œ˜*Jšœœ˜3Jšœœ˜—Jšœœ˜,Jšœ!œ3˜ZJšœ$˜$——šœ™šœœœ˜+Jšœ6˜6J˜—šœœœ˜-Jšœ6˜6J˜—š œœœœœœ ˜LJ™—Jšœ˜—J˜—…—x+