Core.mesa 
Copyright © 1985 by Xerox Corporation. All rights reserved.
Last Edited by: Barth, August 1, 1985 10:58:43 am PDT
Last Edited by: Serlet, July 11, 1985 3:35:55 pm PDT
Spreitzer, August 3, 1985 5:46:47 pm PDT
DIRECTORY IO, Rope;
Core: CEDAR DEFINITIONS = BEGIN
Theory
This interface defines the basic data structures for the Core design automation system. It is actually a general decomposition facility that breaks designs down into cells which are then bound together. Any of the procedures which implement operations upon these types may raise StructureError[InvariantFailed]. This indicates that the implementation has a bug in it. Clients should notify the maintainers should this occur.
Common Types and Errors
ROPE: TYPE = Rope.ROPE;
Properties: TYPE = REF PropertyRec;
PropertyRec: TYPE;
StructureError: SIGNAL [type: StructureErrorType, message: ROPE, data: REF ANYNIL] RETURNS [newData: REF ANYNIL];
StructureErrorType: TYPE = {DuplicateName, InvariantFailed, MissingParameter, NoSuchName};
Designs
Design: TYPE = REF DesignRec;
DesignRec: TYPE = RECORD [
name: ROPENIL,
data: DesignData ← NIL,
properties: Properties ← NIL];
DesignData: TYPE = REF DesignDataRec;
DesignDataRec: TYPE;
Wires
Wire: TYPE = REF WireRec;
WireRec: TYPE = RECORD [
name: ROPENIL,
significance: WireSignificance ← internal,
structure: WireStructure ← atom,
elements: WireSequence ← NIL,
properties: Properties ← NIL];
WireSignificance: TYPE = {
public, --part of a cell type's public wire, but not internal
internal, --part of a cell type's internal wire, but not public
publicInternal, --a public part of a cell type's internal wire
actual --part of the actual wire of some cell instance, but not part of parent's internal wire
};
WireStructure: TYPE = {sequence, record, atom};
WireSequence: TYPE = REF WireSequenceRec;
WireSequenceRec: TYPE = RECORD [c: SEQUENCE size: NAT OF Wire];
Cell Classes
CellClass: TYPE = REF CellClassRec;
CellClassRec: TYPE = RECORD [
name: ROPE,
expand: ExpandProc,
write: WriteProc,
read: ReadProc,
properties: Properties ← NIL];
A cell class must have expand, read and write procedures (except RecordCell and Transistor classes elide the expand proc).
ExpandProc: TYPE = PROC [design: Design, me: CellType] RETURNS [new: CellType];
An expand proc may or may not return a unique copy of the expansion.
WriteProc: TYPE = PROC [design: Design, out: IO.STREAM, me: CellType];
ReadProc: TYPE = PROC [design: Design, in: IO.STREAM] RETURNS [me: CellType];
Cell Types
CellType: TYPE = REF CellTypeRec;
CellTypeRec: TYPE = RECORD [
name: ROPE,
class: CellClass,
publicWire: Wire,
data: REF ANYNIL, 
properties: Properties ← NIL];
CellTypes may not share any part of a publicWire.
END.