DIRECTORY Core USING [CellType, ROPE, Wire], CoreClasses USING [CellInstance, TransistorType]; CoreBeau: CEDAR DEFINITIONS = BEGIN CellType: TYPE = Core.CellType; ROPE: TYPE = Core.ROPE; Wire: TYPE = Core.Wire; CellInstance: TYPE = CoreClasses.CellInstance; TransistorType: TYPE = CoreClasses.TransistorType; WR: TYPE = REF; WireList: PROC [wrs: LIST OF WR _ NIL] RETURNS [Wire]; Wires: PROC [wr1, wr2, wr3, wr4, wr5, wr6, wr7, wr8, wr9, wr10, wr11, wr12, wr13: WR _ NIL] RETURNS [Wire]; Seq: PROC [wr: WR, size: NAT] RETURNS [Wire]; Index: PROC [wr: WR, index: NAT] RETURNS [WR]; Indexes: PROC [wr: WR, start: NAT _ 0, length: NAT] RETURNS [Wire]; PA: TYPE = RECORD [public, actual: WR]; Instance: PROC [type: CellType, pa1, pa2, pa3, pa4, pa5, pa6, pa7, pa8, pa9, pa10, pa11, pa12, pa13: PA _ []] RETURNS [CellInstance]; Cell: PROC [name: ROPE _ NIL, public, onlyInternal: Wire _ NIL, instances: LIST OF CellInstance] RETURNS [CellType]; Transistor: PROC [name: ROPE _ NIL, type: TransistorType _ nE, length: NAT _ 2, width: NAT _ 4] RETURNS [CellType]; SequenceCell: PROC [name: ROPE _ NIL, baseCell: CellType, count: NAT, sequencePorts: Wire _ NIL] RETURNS [CellType]; FindWire: PROC [cell: CellType, wr: WR] RETURNS [Wire]; END. tCoreBeau.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Created by Bertrand Serlet, November 13, 1985 2:59:33 pm PST Bertrand Serlet, November 26, 1985 2:22:15 pm PST This interface should provide all the syntactic sugar to help the designer create Core data structures, while retaining the ability to have handles on the real Core objects. Aliases Creation of Wires WR is the union of the types Wire and ROPE, for user convenience. Basic constructor for creating a structured wire. It is checked that each WR is of type Wire or ROPE. Syntactic sugar of the previous for creating a structured wire. It is checked that each WR is of type Wire or ROPE. Constructor for creating structured wires with the attribute 'sequence'. It is checked that WR is either an atomic Wire or a ROPE. Extractor for extracting a wire from a sequence. If the argument is a Wire, it is checked that it has structure, and then the element is extracted. If the argument is a ROPE, the suffix "[index]" is added to it. All other types are illegal. Extractor/Constructor for creating a structured wire with the attribute 'sequence'. If the argument is a Wire, it is checked that it has structure, and then the sub elements are extracted and recomposed. If the argument is a ROPE, a composed wire made subwires named after the suffixed rope is constructed. Bindings, Instances and RecordCell Records a binding between part of the public The bindings might be incomplete, in that case new wires are created to fill the actual. Creates a CoreClasses.RecordCell, creates an internal by making the union of public and onlyInternal, names all those wires with unique names, fills the public, fills the instances, and finally replaces all actual wires by wires having the same name in the public. Other cell type creation Creates a CoreClasses.Transistor. Creates a CoreSequence.SequenceCellType. Utility Looks into the internal (If the cell is a RecordCell) or in the public (otherwise) to retrieve a wire equal (if wr is a Wire) or having same name (if wr is a Wire or a ROPE). Returns NIL when not finding wr or finding it more than once. ΚΠ˜codešœ ™ Kšœ Οmœ1™