DIRECTORY Core, CoreClasses; Rosemary: CEDAR DEFINITIONS = BEGIN ROPE : TYPE = Core.ROPE; ValueWireList: TYPE = LIST OF ValueWire; ValueWire: TYPE = REF ValueWireRec; ValueWireRec: TYPE = RECORD [ nextStrengthRingMember: ValueWire _ NIL, previousStrengthRingMember: ValueWire _ NIL, currentRing: Drive _ none, internal: InternalValueWire _ NIL, fieldSize: CARDINAL _ 0, coreWire: Core.Wire _ NIL, roseCellInstance: RoseCellInstance _ NIL, d: Drive _ none, type: ValueWireType _ none, -- IF Core.Wire = atom THEN l ELSE none, l: Level _ L, b: BOOL _ FALSE, c: CARDINAL _ 0, lc: LONG CARDINAL _ 0, sub: SEQUENCE size: NAT OF ValueWire]; Drive: TYPE = { expect, -- allows test procs to put expected value in none, --from a test proc it means neither driven nor checked; in switch-level it means no strength at all force, -- weakest drive level, allows test procs to check if device has tristated chargeWeak, chargeMediumWeak, charge, chargeMediumStrong, chargeStrong, chargeVeryStrong, driveWeak, driveMediumWeak, drive, driveMediumStrong, driveStrong, driveVeryStrong, input -- the strongest drive level }; ValueWireType: TYPE = {none, l, b, c, lc, sub}; Level: TYPE = {L, H, X}; Bind: PROC [cellType: Core.CellType, roseClassName: Core.ROPE]; Register: PROC [roseClassName: Core.ROPE, init: InitProc _ NIL, evalSimple: EvalProc _ NIL] RETURNS [sameRoseClassName: Core.ROPE]; InitProc: TYPE = PROC [cellType: Core.CellType, p: ValueWire] RETURNS [stateAny: REF ANY _ NIL]; EvalProc: TYPE = PROC [p: ValueWire, stateAny: REF ANY]; Stop: SIGNAL [msg: ROPE _ NIL, data: REF ANY _ NIL]; Simulation: TYPE = REF SimulationRec; InstantiateCellType: PROC [cellType: Core.CellType] RETURNS [simulation: Simulation]; InstantiateInstances: PROC [cellType: Core.CellType] RETURNS [simulation: Simulation]; Initialize: PROC [simulation: Simulation, steady: BOOL _ TRUE]; Settle: PROC [simulation: Simulation]; GetValue: PROC [wire: Core.Wire] RETURNS [value: ValueWire]; RefreshValue: PROC [value: ValueWire]; SetValue: PROC [simulation: Simulation, value: ValueWire]; PrintValue: PROC [value: ValueWire, out: Core.STREAM]; PrintDrivers: PROC [value: ValueWire, out: Core.STREAM]; PrintWriters: PROC [value: ValueWire, out: Core.STREAM]; RegisterTest: PROC [testName: ROPE, testProc: CellTestProc]; CellTestProc: TYPE = PROC [p: ValueWire, Eval: PROC]; RunTest: PROC [simulation: Simulation, testName: ROPE]; SimulationRec: TYPE = RECORD [ cellType: Core.CellType, roseCellInstances: RoseCellInstances _ NIL, needEval: RoseCellInstance _ NIL, internal: InternalValueWires _ NIL, publicValue: ValueWire _ NIL]; RoseCellType: TYPE = REF RoseCellTypeRec; RoseCellTypeRec: TYPE = RECORD [ init: InitProc _ NIL, evalSimple: EvalProc _ NIL]; RoseCellInstances: TYPE = LIST OF RoseCellInstance; RoseCellInstance: TYPE = REF RoseCellInstanceRec; RoseCellInstanceRec: TYPE = RECORD [ scheduleNext: RoseCellInstance _ NIL, roseCellType: RoseCellType, coreCellInstance: CoreClasses.CellInstance, value: ValueWire, state: REF ANY _ NIL]; InternalValueWires: TYPE = LIST OF InternalValueWire; InternalValueWire: TYPE = REF InternalValueWireRec; InternalValueWireRec: TYPE = RECORD [ l: Level _ L, writers: RoseCellInstances _ NIL, writerValues: ARRAY Drive OF ValueWire _ ALL[NIL], readers: RoseCellInstances _ NIL, readerValues: ValueWireList _ NIL]; END. NRosemary.mesa Barth, November 4, 1985 6:50:06 pm PST clients should ignore these fields Behaviour Initializes the state and the value from the context contained in the cell type. This signal may be raised when a behavioural proc wishes to display a string to a user and wait for a proceed or abort. Simulation Instantiation and Control The cellType must have a behavioural class on its property list. The cellType must be a record. The simulation is instantiated for the list of cell instances directly on the record cell type. No flattening occurs. Reset the state. If steady, wire are initialized to "easy" values, like Low and 0; if not, they are initialized to Xish values, if possible, otherwise they are initialized randomly. Relaxes the simulation. Get the value of the wire. Updates the value. Set the value of the wire. Print the value of the wire. Print the value of the actuals for each writer attached to the value wire which is in the highest nonnull strength ring. Print the value of the actuals for each writer attached to the value wire. Test Procedures Internals Κ˜™ J™&—J™JšΟk œ˜J˜JšΟnœœ œ˜#J˜Jšœœœ˜J˜Jšœœœ ˜(Jšœ œœ˜#šœœœ˜codešœ"™"Kšœ$œ˜(Kšœ(œ˜,Jšœ˜Jšœœ˜"Jšœ œ˜Jšœœ˜Jšœ%œ˜)—Jšœ˜JšœΟc)˜FJ˜ Jšœœœ˜Jšœœ˜Jšœœœ˜Jšœœœœ ˜&J˜—šœœ˜KšœŸ.˜5KšœŸd˜išœŸK˜QKšœ˜—šœ˜Kšœ3˜3Kšœ˜—šœ˜Kšœ0˜0—KšœŸ˜"Kšœ˜K˜—šœœ˜/J˜—š œœœœœ˜K˜—head™ šžœœ/œ˜?K˜—šžœœœœœœœ˜ƒK˜—šžœœœ)œ œœœ˜`K™PK™—Kš žœœœœœ˜8K˜š œœœœœœœ˜4K™wK˜——šœ$™$Kšœ œœ˜%K˜šžœœœ˜UK™@J˜—šžœœœ˜VK™–J˜—šž œœ"œœ˜?K™ΆK™—šžœœ˜&K™K™—šžœœœ˜