DIRECTORY Core, CoreClasses; CoreFlatten: CEDAR DEFINITIONS = BEGIN Wire: TYPE = Core.Wire; CellType: TYPE = Core.CellType; ROPE: TYPE = Core.ROPE; CellInstance: TYPE = CoreClasses.CellInstance; InstantiationPath: TYPE = LIST OF CellInstance; -- deeper first wireSource: ATOM; WireSource: TYPE = REF WireSourceRec; WireSourceRec: TYPE = RECORD [ instantiationPath: InstantiationPath, wire: Wire, instance: CellInstance]; -- NIL for public and internal wires, not NIL for actual wires instanceSource: ATOM; InstanceSource: TYPE = REF InstanceSourceRec; InstanceSourceRec: TYPE = RECORD [ instantiationPath: InstantiationPath, instance: CellInstance]; GetShallowest: PROC [path: InstantiationPath] RETURNS [shallowest: CellInstance]; AllButShallowest: PROC [path: InstantiationPath] RETURNS [allBut: InstantiationPath]; Flatten: PROC [cellType: CellType, control: FlattenControl] RETURNS [flat: CellType]; ExpandNonPrimitive: FlattenControl; FlattenControl: TYPE = REF FlattenControlRec; FlattenControlRec: TYPE = RECORD [Decide: FlattenControlProc, data: REF ANY]; FlattenControlProc: TYPE = PROC [data: REF ANY, who: InstantiationPath] RETURNS [ExpandDecision]; ExpandDecision: TYPE = {leaf, expand}; CoreFlattenCutSets: ATOM; ControlByCutSet: PROC [cutSetName: ROPE] RETURNS [control: FlattenControl]; ControlByRecognition: PROC [rl: RecognitionList] RETURNS [control: FlattenControl]; RecognitionList: TYPE = LIST OF Recognition; Recognition: TYPE = RECORD [ recognizer: Recognizer, whatToDo: SELECT kind: * FROM immediate => [decision: ExpandDecision], nest => [subControl: FlattenControl], ENDCASE]; Recognizer: TYPE = REF RecognizerRec; RecognizerRec: TYPE = RECORD [ Recognize: PROC [data: REF ANY, ci: CellInstance] RETURNS [IRecognizeYou: BOOL], data: REF ANY]; RecognizeName: PROC [name: ROPE] RETURNS [r: Recognizer]; END. ’CoreFlatten.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Spreitzer, September 14, 1985 2:42:44 pm PDT Barth, November 1, 1985 4:48:36 pm PST Bertrand Serlet October 4, 1985 3:37:37 pm PDT Introduction This interface defines a utility for flattening the data structure defined in Core. Types Flat Core A flattened piece of Core is a record cell type. None of the instances or wires has a name. Each instance notes its source on its instanceSource property. Each wire notes its source on its wireSource property. Relative to the containing cell type, the levels of intermediate structure (i.e., cell instances) that have been removed. Flattening Each descendent is expanded or not, depending on what control says. Expands instances whose class is not CoreClasses.transistorCellClass Control Flattening can be carried out to an arbitrary depth. The decision of whether to expand or stop is made at each node in the hierarchy. An Algebra of Control Terminates flattening if the object class is CoreClasses.transistorCellClass or if the CoreFlattenCutSets property on the instance or cell type contains a list of rope one of which is equal to the cutSetName. Κ&˜– "Cedar" stylešœ™Jšœ Οmœ1™˜X—K˜Kšœžœ˜Kšœžœžœ˜-šœžœžœ˜"Kšœ%˜%Kšœ˜—K˜KšΟn œžœžœ˜QK˜Kš‘œžœžœ˜U—™ š‘œžœ/žœ˜UKšœ6Οeœ™C—K˜˜#K™D——™M™†K˜Kšœžœžœ˜-Kš œžœžœžœžœžœ˜MK˜Kš ‘œžœžœžœžœžœ˜aK˜Kšœžœ˜&—™Kšœžœ˜š‘œžœžœžœ˜KKšœΠ™ΠK™—š‘œžœžœ˜SK˜—Kšœžœžœžœ ˜,šœ žœžœ˜K˜šœ žœ ž˜Kšœ(˜(Kšœ%˜%Kšžœ˜ —K˜—Kšœ žœžœ˜%šœžœžœ˜Kš ‘ œžœžœžœžœžœ˜PKšœžœžœ˜K˜—š‘ œžœžœžœ˜9K˜——Jšžœ˜—…—<