RTCoreUtil.mesa
Copyright Ó 1985, 1986, 1987 by Xerox Corporation. All rights reserved.
by Bryan Preas August 29, 1985 2:48:22 pm PDT
last edited by Bryan Preas December 18, 1986 4:59:04 pm PST
DIRECTORY
Core, CoreClasses, CoreFlat, Rope;
RTCoreUtil:
CEDAR
DEFINITIONS =
BEGIN
GetCoreIntProp:
PROC [cellType: Core.CellType, prop:
ATOM, default:
INT]
RETURNS [num:
INT];
get a integer number property from a cell
PutCoreIntProp:
PROC [cellType: Core.CellType, prop:
ATOM, num:
INT];
put a integer number property on a cell
GetCoreRealProp:
PROC [cellType: Core.CellType, prop:
ATOM, default:
REAL]
RETURNS [num:
REAL];
get a real number property from a cell
PutCoreRealProp:
PROC [cellType: Core.CellType, prop:
ATOM, num:
REAL];
put a real number property on a cell
GetCoreBoolProp:
PROC [cellType: Core.CellType, prop:
ATOM, default:
BOOL]
RETURNS [val:
BOOL];
get a Bool property from a cell
PutCoreBoolProp:
PROC [cellType: Core.CellType, prop:
ATOM, val:
BOOL];
put a Bool property on a cell
GetCoreAtomProp:
PROC [cellType: Core.CellType, prop:
ATOM]
RETURNS [
ATOM];
get a Atom property from a cell
CopyProps:
PROC [sourceProperties: Core.Properties, interestingProperties: RTCoreUtil.PropertyKeys]
RETURNS [destProperties: Core.Properties];
copy the interesting properties
EnumerateInstances:
PROC [cellType: Core.CellType, eachInstance: EachInstanceProc]
RETURNS [quit:
BOOL];
May raise StructureError[MissingParameter].
EachInstanceProc: TYPE = PROC [cellInstance: CoreClasses.CellInstance] RETURNS [quit: BOOL ← FALSE];
EnumerateFlatWires:
PROC [wire: Core.Wire, eachWire: EachWireProc]
RETURNS [quit:
BOOL];
EachWireProc: TYPE = PROC [wire: Core.Wire] RETURNS [subWires: BOOL ← TRUE, quit: BOOL ← FALSE];
EnumerateFlatInstancePins:
PROC [cellInstance: CoreClasses.CellInstance, eachInstancePin: EachInstancePinProc];
EachInstancePinProc: TYPE = PROC [actualWire, publicWire: Core.Wire] RETURNS [subWires: BOOL ← TRUE, quit: BOOL ← FALSE];
Flatten:
PROC [root: Core.CellType, flattenCellType: FlattenCellTypeProc, definePublicWire, defineInternalWire: FlatWireProc, defineInstance: FlatInstanceProc, interestingProperties: PropertyKeys ←
NIL];
FlatWireProc: TYPE = PROC [flatWire: CoreFlat.FlatWireRec] RETURNS [quit: BOOL ← FALSE];
FlatInstanceProc: TYPE = PROC [flatCellType: CoreFlat.FlatCellTypeRec, cell: Core.CellType, bindings: CoreFlat.Bindings, properties: Core.Properties] RETURNS [quit: BOOL ← FALSE];
FlattenCellTypeProc: TYPE = PROC [cellType: Core.CellType] RETURNS [flatten: BOOL];
PropertyKeys: TYPE = REF PropertyKeysRec;
PropertyKeysRec:
TYPE =
RECORD [
p: SEQUENCE size: NAT OF ATOM];
defaultFlatten: RTCoreUtil.FlattenCellTypeProc;
flatten until celltype has a $Layout property
END.