DIRECTORY Core, CoreFlat; DBusConnect: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Core.ROPE; Wire: TYPE = Core.Wire; CellType: TYPE = Core.CellType; FlatCellType: TYPE = CoreFlat.FlatCellType; Order: TYPE = CoreFlat.FlatCellTypes; DBusData: TYPE = REF DBusDataRec; DBusDataRec: TYPE = RECORD [ name: ROPE _ NIL, control: Wire _ NIL, in: Wire _ NIL, out: Wire _ NIL]; WireDBusGivenOrder: PROC [root: CellType, busName: ROPE, order: Order]; WireDBusComputeOrder: PROC [root: CellType, busName: ROPE] RETURNS [order: Order]; OrderSize: PROC [order: Order] RETURNS [index: NAT]; OrderIndex: PROC [order: Order, bit: FlatCellType] RETURNS [index: NAT]; WriteOrder: PROC [order: Order, fileName: ROPE]; ReadOrder: PROC [fileName: ROPE] RETURNS [order: Order]; END. >DBusConnect.mesa Copyright c 1986 by Xerox Corporation. All rights reserved. Barth, November 14, 1986 2:49:12 pm PST Theory This program adds the proper wires to a Core structure so that a DBus is properly wired. Treats any cell type having the property $DBusData as a leaf state cell. If the wires referenced by DBusDataRec are not already public they will be added to the public of the leaf state cell. A cell type having the property $DBusControl must be reachable from the root cell type. This cell must have the property $DBusData. This program wires the control wire of DBusControl to the control wire of all leaf state cells. If no order is supplied then the program wires the out wire of DBusControl to the in wire of the first leaf state cell it finds, the out wire of the first leaf state cell it finds to the in wire of the next leaf state cell it finds and so on until there are no more leaf state cells at which time it wires the out wire of the last leaf state cell to the in wire of DBusControl. If there are no leaf state cells then it wires the out wire of DBusControl to the in wire of DBusControl. Adds all the public and internal wires necessary to accomplish the job. If an order is supplied then the program wires the leaf state cells in the order of the order list. What about prewired portions of a DBus? What about portions of the diagram prewired by the standard cell system, i.e. partial orders supplied? Perhaps this program should get into the act between placement and routing. Types Wiring The cells in the order list are wired into a DBus. The value of the DBusName and DBusControl atoms are checked against busName. If they are not Rope.Equal then an error message is issued. busName determines which DBusControl cell type to use for the root of the DBus and to select which leaf state cells are to be wired into the bus. Returns a list which specifies the order in which they were wired. Order Operations Returns the number of bits in the order. Map from logical bit to bit position within the order. Write an order into a file. Read an order from a file. Κ?– "cedar" style˜– "Cedar" stylešœ™Icode– "Cedar" stylešœ Οmœ1™