CoreFlatten.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Barth, March 28, 1986 6:12:10 pm PST
DIRECTORY
Core, CoreClasses;
CoreFlatten: CEDAR DEFINITIONS = BEGIN
Theory
Many design tools only interpret CoreClasses.RecordCellType compositions and primitive elements such as CoreClasses.Transistor. This interface assists in recasting other composition types into record cells, flattening the resulting record cells into transistors and providing syntatic sugar for describing the flattened representation.
An instantiation path is a list of cell instance pointers. The first element of the list is the deepest instance, the last element of the list is an instance in the root cell type. A wire path is a list of wire pointers starting with a pointer to the deepest wire and ending with a pointer to the root wire.
Operations
Recordify: PROC [ct: Core.CellType] RETURNS [rc: Core.CellType];
GetNewPath: PROC [rootCellType: Core.CellType, newPath: Core.ROPE, currentInstancePath: CoreClasses.CellInstances ← NIL, currentWirePath: Core.Wires ← NIL] RETURNS [newInstancePath: CoreClasses.CellInstances, newWirePath: Core.Wires];
ParseError: ERROR [msg: Core.ROPENIL];
Syntax Notation
item | item = choose one
?item = zero or one item
SMALL CAPS or puncuation other than bold ()?| = terminals
item s... = zero or more items, separated by s;
::= = keyword on left hand side is defined by expression on right hand side
Grammar
Path ::= ?(/ ?(Remove | ROOT ) ?InstancePath .) ?(((PUBLIC | INTERNAL | ACTUAL ) . ) | Remove ) WirePath
Remove ::= -...
InstancePath ::= ( Name | Number ) /...
WirePath ::= ( Name | Number ) ....
Name ::= Letter (Letter | Digit) ...
Number ::= Digit ...
Letter ::= one of a-z | one of A-Z
Digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Grammar Notes
White space may appear anywhere except inside Name or Number. Reserved words are matched ignoring case. Each "-" causes the last item on the corresponding current path to be removed. ROOT causes the instance path to begin at the root cell type. ACTUAL causes the wire path to begin at the actual of the last instance of the instance path and then use the public names of the instance's cell type to index the actual. PUBLIC and INTERNAL cause the wire path to begin at the public or internal of the cell type of the last instance.
END.