CoreCreate.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Bertrand Serlet, March 20, 1986 0:22:06 am PST
Barth, May 7, 1986 10:17:04 am PDT
Louis Monier March 12, 1986 9:59:34 am PST
Types
CellType: TYPE = Core.CellType;
Properties: TYPE = Core.Properties;
ROPE: TYPE = Core.ROPE;
Wire: TYPE = Core.Wire;
CellInstances: TYPE = CoreClasses.CellInstances;
CellInstance: TYPE = CoreClasses.CellInstance;
TransistorType: TYPE = CoreClasses.TransistorType;
Wires
WR:
TYPE =
REF ← NIL;
WR is the union of the types Wire and ROPE, for user convenience.
WireList:
PROC [wrs:
LIST
OF
WR ←
NIL, name:
ROPE ←
NIL, props: Properties ←
NIL]
RETURNS [Wire];
Basic constructor for creating a structured wire. Each element of wrs must be of type Wire or ROPE.
Wires:
PROC [wr1, wr2, wr3, wr4, wr5, wr6, wr7, wr8, wr9, wr10, wr11, wr12, wr13:
WR ←
NIL, name:
ROPE ←
NIL, props: Properties ←
NIL]
RETURNS [Wire];
Same as WireList but with more sugar. Each wr must be of type Wire or ROPE.
Seq:
PROC [name:
ROPE ←
NIL, size:
NAT, protoChild: Wire ←
NIL]
RETURNS [Wire];
Creates a wire with size children. protoChild#NIL => CoreOps.CopyWire is used to make children.
Index:
PROC [wr:
WR, index:
NAT]
RETURNS [
WR];
Extractor for extracting a wire from a sequence. If the argument is a Wire then the element is extracted. If the argument is a ROPE, the suffix "[index]" is added to it. wr must be of type Wire or ROPE.
Range:
PROC [wire: Wire, start, size:
NAT, name:
ROPE ←
NIL, props: Properties ←
NIL]
RETURNS [Wire];
Extractor for extracting a group of wires from a sequence. Elements are extracted and grouped together. The argument must be of type Wire only.
Union:
PROC [wr1, wr2, wr3, wr4, wr5, wr6, wr7, wr8, wr9, wr10, wr11, wr12, wr13: Wire ←
NIL, name:
ROPE ←
NIL, props: Properties ←
NIL]
RETURNS [Wire];
Creates flat union of arguments.
Cells
PA:
TYPE =
RECORD [public, actual:
WR];
Records a binding.
Instance:
PROC [type: CellType, pa1, pa2, pa3, pa4, pa5, pa6, pa7, pa8, pa9, pa10, pa11, pa12, pa13:
PA ← [], name:
ROPE ←
NIL, props: Properties ←
NIL]
RETURNS [CellInstance];
InstanceList:
PROC [type: CellType, pas:
LIST
OF
PA ←
NIL, name:
ROPE ←
NIL, props: Properties ←
NIL]
RETURNS [CellInstance];
Cell:
PROC [public: Wire, onlyInternal, internal: Wire ←
NIL, instances: CellInstances, name:
ROPE ←
NIL, props: Properties ←
NIL]
RETURNS [CellType];
Creates a CoreClasses.RecordCell.
If internal=NIL then internal ← Union[public, onlyInternal].
If internal#NIL then onlyInternal is discarded.
Transistor:
PROC [type: TransistorType ← nE, length:
NAT ← 2, width:
NAT ← 4, name:
ROPE ←
NIL, props: Properties ←
NIL]
RETURNS [CellType];
Creates a CoreClasses.Transistor.
SequenceCell:
PROC [baseCell: CellType, count:
NAT, sequencePorts: Wire ←
NIL, flatSequencePorts: Wire ←
NIL, name:
ROPE ←
NIL, props: Properties ←
NIL]
RETURNS [CellType];
Creates a CoreSequence.SequenceCellType.