CoreRouteFlat.mesa
Copyright (C) 1986 by Xerox Corporation. All rights reserved.
Created by Bryan Preas, August 21, 1986 6:23:51 pm PDT
Don Curry December 7, 1987 11:26:37 am PST
DIRECTORY
CD, Core, CoreFlat, DABasics, RefTab, SymTab, Rope;
CoreRouteFlat: CEDAR DEFINITIONS =
BEGIN
Theory
This interface captures the routing structure of a flattened Core CellType.
Types
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 ANYNIL]
RETURNS [wireWidth: INT];
Creating the structure by flattening to subcells which have layout.
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];
Utilities
IsPublic:   PROC [net: Net] RETURNS [isPublic: BOOLEAN];
PrintStructure: PROC [structure: Structure];
TranslateRange: PROC [instance: Instance, pin: Pin] RETURNS [range: Range];
END.