<> <> <<>> DIRECTORY Core; ValueWires: CEDAR DEFINITIONS = BEGIN <> <> <> <> <> ValueWire: TYPE = REF ValueWireRec; <<>> <> <<>> <> <> < [d: Drive _ none, l: Level _ L],>> < [d: Drive _ none, ls: LevelSequence _ NIL],>> < [d: Drive _ none, b: BOOL _ FALSE],>> < [d: Drive _ none, bs: BitSequence _ NIL],>> < [d: Drive _ none, c: CARDINAL _ 0],>> < [d: Drive _ none, lc: LONG CARDINAL _ 0],>> < [composite: SEQUENCE size: NAT OF ValueWire],>> <> <<>> ValueWireRec: TYPE = RECORD [ type: ValueWireType _ composite, d: Drive _ none, l: Level _ L, ls: LevelSequence _ NIL, b: BOOL _ FALSE, bs: BoolSequence _ NIL, c: CARDINAL _ 0, lc: LONG CARDINAL _ 0, composite: SEQUENCE size: NAT OF ValueWire]; ValueWireType: TYPE = {l, ls, b, bs, c, lc, composite}; 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, driveStrongest }; Level: TYPE = {L, H, X}; LevelSequence: TYPE = REF LevelSequenceRec; LevelSequenceRec: TYPE = RECORD [levels: PACKED SEQUENCE size: NAT OF Level]; BoolSequence: TYPE = REF BoolSequenceRec; BoolSequenceRec: TYPE = RECORD [bools: PACKED SEQUENCE size: NAT OF BOOL]; ValueWireList: TYPE = LIST OF ValueWire; <> CreateValueWire: PROC [wires: Core.Wire] RETURNS [value: ValueWire]; <> <<>> valueType: ATOM; -- the property value must be a REF ValueWireType valueDrive: ATOM; -- the property value must be a REF Drive IsComposite: PROC [wire: Core.Wire] RETURNS [BOOL]; <> <<>> PrintValueWire: PROC [wire: Core.Wire, value: ValueWire, out: Core.STREAM]; <> END.