LichenDataOps.Mesa
Last tweaked by Mike Spreitzer on August 27, 1987 2:17:23 pm PDT
DIRECTORY FS, IO, LichenCollections, LichenDataStructure;
LichenDataOps: CEDAR DEFINITIONS =
BEGIN OPEN Colls:LichenCollections, LichenDataStructure;
EnsureAllIn: PROC [design: Design];
= ct  deisgn : EnsurePrivate[ct]
EnsurePublic: PROC [ct: CellType];
Make sure interface is fully defined.
EnsurePrivate: PROC [ct: CellType];
Make sure the internals are as known as possible.
ExpansionKnown: PROC [ct: CellType] RETURNS [known: BOOL];
Do we know how this cell type is decomposed?
AssertionOp: TYPE = {ignore, report, check, establish};
MerelyCheckableAssertionOp: TYPE = AssertionOp [ignore .. check];
FailableAssertionOp: TYPE = AssertionOp [report .. check];
CheckDesign: PROC [design: Design, rep, norm: AssertionOp, comparable: MerelyCheckableAssertionOp];
CheckCellType: PROC [ct: CellType, rep, norm: AssertionOp, comparable: MerelyCheckableAssertionOp, interface, internals, instances: BOOLTRUE];
CheckCellTypes: PROC [cts: ConstSet--of CellType--, rep, norm: AssertionOp, comparable: MerelyCheckableAssertionOp, interface, internals, instances: BOOLTRUE];
NoteChange: PROC [cellType: CellType];
AddPort: PROC [p: PortPrivate ← []] RETURNS [port: Port];
Adds as last child of parent, if any.
FullyAddPort: PROC [p: PortPrivate ← [], andReportConnectionTo: CellInstance ← NIL] RETURNS [port: Port, connection: Wire ← NIL];
Adds dummy wires by instances and groups in arrays.
RemovePort: PROC [port: Port];
AddEdge: PROC [vs: ARRAY GraphDirection OF Vertex, port: Port];
Edge for port.prev (if that's not NIL) must already be present.
AddEdges: PROC [vs: ARRAY GraphDirection OF Vertex, port: Port];
Will introduce Intermediaries, if necessary.
RemoveEdge: PROC [e: Edge];
RemoveEdges: PROC [e: Edge];
Removes ancestor Intermediaries that have no children.
UnlinkPort: PROC [ci: CellInstance, port: Port];
Remove the edge for given port, which must be immediately connected.
UnlinkPorts: PROC [ci: CellInstance, ports: ConstSet--of Port--];
Remove the edges for given ports, which need not be immediately connected.
Instantiate: PROC [type, containingCT: CellType, names: ListData ← NIL, other: Assertions ← NIL] RETURNS [ci: CellInstance];
PortForWire: PROC [ct: CellType, internal: Wire, ci: CellInstance, mayAdd: BOOL] RETURNS [port: Port, external: Wire];
If ci#NIL, ci.port is connected to external.
FullyInstantiate: PROC [type, containingCT: CellType, names: ListData ← NIL, other: Assertions ← NIL] RETURNS [ci: CellInstance];
Adds dummy wires.
CreateWire: PROC [containingCT: CellType, containingWire: Wire ← NIL, names: ListData ← NIL, other: Assertions ← NIL, copy: Wire ← NIL] RETURNS [w: Wire];
As last child of containingWire, if any.
With same structure as copy, if given, leaf structure otherwise.
CreateIntermediary: PROC [from: Vertex, go: GraphDirection, containingCT: CellType, port: Port, names: ListData ← NIL, other: Assertions ← NIL] RETURNS [im: Intermediary];
CreateCellType: PROC [design: Design, cellTypeName: ROPE, class: CellClass, internals: BOOL, otherPublic, otherPrivate: Assertions ← NIL] RETURNS [ct: CellType];
CreateArray: PROC [design: Design, cellTypeName: ROPE, class: CellClass, eltType: CellType, size, jointsPeriod: Size2, borders: ARRAY Dim OF ARRAY End OF NAT, otherPublic, otherPrivate: Assertions ← NIL] RETURNS [ct: CellType];
KnowVertexName: PROC [v: Vertex, name: SteppyName];
ForgetVertexName: PROC [v: Vertex, name: SteppyName];
IndexVertexNames: PROC [v: Vertex, names: Set ← Colls.nilColl];
UnindexVertexNames: PROC [v: Vertex];
NoteLevelChange: PROC [w: Wire];
DeleteVertex: PROC [v: Vertex];
IsMirror: PROC [v: CellInstance] RETURNS [isMirror: BOOL];
AddMirror: PROC [CellType];
MergeNets: PROC [net1, net2: Wire] RETURNS [merged, doomed: Wire];
GroupWires: PROC [sibs: Seq--of wire--, parentNames: ListData] RETURNS [parent: Wire];
The sibs must all be siblings; the parent is introduced in their place and the siblings are moved below the parent. Graph connections are fixed up.
GroupPorts: PROC [sibs: Seq--of port--, parentNames: ListData] RETURNS [parent: Port];
ExpandName: PROC [fileName, defaultExtension: ROPE] RETURNS [fullFName: ROPE, cp: FS.ComponentPositions];
ParseSteppyName: PROC [raw: ROPE] RETURNS [p: SteppyName];
UnparseSteppyName: PROC [s: SteppyName] RETURNS [ROPE];
Log: PROC [fmt: ROPE, args: LORANIL];
PrintOnLog: PROC [REF ANY];
END.