DMCtlBusModelImpl.mesa
Written By: Pradeep Sindhu, September 3, 1985 10:39:43 pm PDT
Last Edited By: Pradeep Sindhu September 3, 1985 10:59:47 pm PDT
DIRECTORY
DM, DragOpsCross, DMCtlBusModel;
DMCtlBusModelImpl: CEDAR PROGRAM
EXPORTS DMCtlBusModel = BEGIN OPEN DMCtlBusModel;
Create: PUBLIC PROC [type: BusType] RETURNS [pbus: DM.Component] = {
pbus ← NEW [DM.ComponentRec ← [
action: [Reset, PhA, EvPhA, PhB, EvPhB],
history: NIL,
componentType: $CtlBus,
subComponents: NIL,
specific: NEW [CtlBusSpecificRec ← [busType: type, signals: ALL[FALSE]]]]]
};
Rd: PUBLIC PROC [sidx: SignalIndex, ctlBus: DM.Component] RETURNS [BOOL] = {
pvt: CtlBusSpecific ← NARROW[ctlBus.specific];
RETURN [pvt.signals[sidx]]
};
Dr: PUBLIC PROC [sidx: SignalIndex, ctlBus: DM.Component, value: BOOL] = {
pvt: CtlBusSpecific ← NARROW[ctlBus.specific];
pvt.signals[sidx] ← value;
};
PhA: DM.ActionProc = {
};
EvPhA: DM.ActionProc = {
};
PhB: DM.ActionProc = {
};
EvPhB: DM.ActionProc = {
};
Reset: DM.ActionProc = {
component.history ← NIL
};
END.