private void onClock(object sender, CyclesEventArgs e) { uint cycles = (ushort)e.CycleCount; if (!_wdgEnable) { return; } if (_currentCycles > cycles) { _currentCycles -= cycles; return; } cycles -= (ushort)_currentCycles; this.ResetCurrentCycles(); _currentCycles -= cycles; if (!_intEnable) { return; } _interuptController.InteruptNotify(mToken); }//onClock
}//init /// <summary> /// This function is called when the simulator executes an instruction and /// is notifying the interested plugins that cycles have been expended. /// Pass this on to the 2 individual timers /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void mHost_Cycles(object sender, CyclesEventArgs args) { uint count = (uint)args.CycleCount; mTimerBlocks[0].onCycles(count); mTimerBlocks[1].onCycles(count); UpdateUserInterface(false); }//mHost_Cycles
private void onClock(object sender, CyclesEventArgs e) { uint cycles = (uint)e.CycleCount; //clock cycles has occurred, lets notify the 3 timer blocks _timerBlocks[0].onClock(cycles); _timerBlocks[1].onClock(cycles); _timerBlocks[2].onClock(cycles); }