<> <> <> <> DIRECTORY CD, Core, CoreFlat, DABasics, RefTab, SymTab, Rope; CoreRouteFlat: CEDAR DEFINITIONS = BEGIN <> <> <> Structure: TYPE = REF StructureRec; StructureRec: TYPE = RECORD [ name: Rope.ROPE _ NIL, instances: LIST OF Instance _ NIL, -- all instances nets: SymTab.Ref _ NIL, -- key is flatwire label oNodes: RefTab.Ref _ NIL, -- publics to oNodes outerInstance: Instance _ NIL, -- outer instance (if any) bindings: CoreFlat.Bindings _ NIL, -- initial root public bindings auxLabels: SymTab.Ref _ NIL, -- Label to LIST OF AuxLabels netWidth: NetWidthProc _ NIL ]; -- NIL => max pin size Instance: TYPE = REF InstanceRec; InstanceRec: TYPE = RECORD [ name: Rope.ROPE _ NIL, -- should be unique among instances flatCell: CoreFlat.FlatCellType _ NIL, -- redundant be useful id netONodes: LIST OF NetONode _ NIL, -- oNode bindngs for for this inst position: DABasics.Position _ [0, 0], -- current position of instance schIR: DABasics.Rect _ [0,0,-1,-1], -- schematic Interest Rectangle orientation: DABasics.Orientation _ original, -- current orientation placed: BOOLEAN _ FALSE, -- true if instance placed layObject: CD.Object _ NIL, -- layout layShell: CD.Object _ NIL, -- layout shell, needed by clients rootInstance: BOOL _ FALSE, -- true only for root the instance any: REF ANY _ NIL, -- for use by client props: Core.Properties _ NIL ]; -- inst props w/ defaults =object props NetONode: TYPE = RECORD [net: Net _ NIL, oNode: ONode _ NIL]; Net: TYPE = REF NetRec; -- = collections of instance oNodes NetRec: TYPE = RECORD [ name: Rope.ROPE _ NIL, -- should be unique among the nets instONodes: LIST OF InstONode _ NIL, -- instance-oNode pairs for this net any: REF ANY _ NIL, -- for use by client properties: Core.Properties _ NIL ]; -- merged properties ? InstONode: TYPE = RECORD [instance: Instance _ NIL, oNode: ONode _ NIL]; ONode: TYPE = REF ONodeRec; -- = public atomic wire ONodeRec: TYPE = RECORD [ name: Rope.ROPE _ NIL, -- optional name of cellType public pins: LIST OF Pin _ NIL, -- physical connections public: BOOL _ FALSE, -- true only for root cell publics properties: Core.Properties _ NIL ]; Pin: TYPE = RECORD [ range: Range _ [0, 0], -- in interest coordinate system side: DABasics.SideOrNone _ none, -- routing side layer: CD.Layer _ CD.undefLayer ]; Range: TYPE = RECORD [min, max: INT]; -- range of pin along side NetWidthProc: TYPE = PROC [net: Net, structure: Structure, direction: DABasics.Direction, context: REF ANY _ NIL] RETURNS [wireWidth: INT]; <> FlattenToLayout: PROC [ root: Core.CellType, propKeys: LIST OF ATOM _ NIL, -- interesting wire, instance and cell props properties: Core.Properties _ NIL ] -- root instance props RETURNS [structure: Structure]; <> IsPublic: PROC [net: Net] RETURNS [isPublic: BOOLEAN]; <<>> PrintStructure: PROC [structure: Structure]; TranslateRange: PROC [instance: Instance, pin: Pin] RETURNS [range: Range]; END.