<> <> <> <<>> DIRECTORY PBusModel, ProcessorModel; ProcessorModelImpl: CEDAR PROGRAM EXPORTS ProcessorModel = BEGIN OPEN ProcessorModel; Create: PUBLIC PROC [commandList: LIST OF ProcessorCommand _ NIL, pbus: DM.Component] RETURNS [processor: DM.Component] = { processor _ NEW [DM.ComponentRec _ [ action: [Reset, PhA, EvPhA, PhB, EvPhB], history: NIL, componentType: $Processor, specific: NEW [ProcessorSpecificRec _ [commandList: commandList, pbus: pbus]]]] }; PhA: DM.ActionProc = { private: DM.Component _ NARROW[component]; IF processor.commandList = NIL THEN ERROR; processor.pbus.pbusWires.pCmdA _ processor.commandList.first.cmd; processor.pbus.pbusWires.pData _ processor.commandList.first.adrs; }; EvPhA: DM.ActionProc = { }; PhB: DM.ActionProc = { IF processor.commandList.first.cmd = Store THEN processor.pbus.pbusWires.pData _ processor.commandList.first.data; }; EvPhB: DM.ActionProc = { IF processor.pbus.pbusWires.pRejectB THEN NULL ELSE { IF processor.commandList.first.cmd = Fetch THEN processor.commandList.first.data _ processor.pbus.pbusWires.pData; processor.history _ CONS[processor.commandList.first, processor.history]; processor.commandList _ processor.commandList.rest }; }; Reset: DM.ActionProc = { }; END. <<>>