Fixed problem in DeviceSettings::strParam, returned wrong string
[avr-sim.git] / src / SimulationClock.h
blob8941b1b94e9be597e3243aaf003333c91271dec7
1 #ifndef SIM_SIMULATIONCLOCK_H
2 #define SIM_SIMULATIONCLOCK_H
4 #include "Clock.h"
6 namespace sim {
8 class SimulationObject;
10 /**
11 * @author Tom Haber
12 * @date Apr 27, 2008
13 * @brief Coordinates the timing between the components of the simulation.
15 * The SimulationClock class is used to coordinate the timing
16 * between the different peripherals within a processor and
17 * in some cases, the timing between several simulated
18 * processors and modules.
20 * Simulation objects can be notified at a specific
21 * instance in time by setting a break point.
23 class SimulationClock : public Clock<SimulationObject> {
24 public:
25 SimulationClock() : finished(false), maxTicks(0) {}
27 public:
28 void exec();
29 void finish() { finished = true; }
30 void setMaxTicks(ClockOffset ticks) { maxTicks = ticks; }
32 private:
33 bool finished;
34 ClockOffset maxTicks;
39 #endif /*SIM_SIMULATIONCLOCK_H*/