diff options
Diffstat (limited to 'src/mem/ruby/eventqueue')
-rw-r--r-- | src/mem/ruby/eventqueue/RubyEventQueue.cc | 5 | ||||
-rw-r--r-- | src/mem/ruby/eventqueue/RubyEventQueue.hh | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mem/ruby/eventqueue/RubyEventQueue.cc b/src/mem/ruby/eventqueue/RubyEventQueue.cc index 271f8f137..8e9b7b18d 100644 --- a/src/mem/ruby/eventqueue/RubyEventQueue.cc +++ b/src/mem/ruby/eventqueue/RubyEventQueue.cc @@ -40,9 +40,8 @@ // Class public method definitions -RubyEventQueue theEventQueue; - -RubyEventQueue::RubyEventQueue() +RubyEventQueue::RubyEventQueue(Tick _clock) + : m_clock(_clock) { m_prio_heap_ptr = NULL; init(); diff --git a/src/mem/ruby/eventqueue/RubyEventQueue.hh b/src/mem/ruby/eventqueue/RubyEventQueue.hh index fe7bc2833..8bd74a36e 100644 --- a/src/mem/ruby/eventqueue/RubyEventQueue.hh +++ b/src/mem/ruby/eventqueue/RubyEventQueue.hh @@ -70,14 +70,14 @@ class RubyEventQueueNode; class RubyEventQueue { public: // Constructors - RubyEventQueue(); + RubyEventQueue(Tick clock); // Destructor ~RubyEventQueue(); // Public Methods - Time getTime() const { return m_globalTime; } + Time getTime() const { return curTick/m_clock; } void scheduleEvent(Consumer* consumer, Time timeDelta) { scheduleEventAbsolute(consumer, timeDelta + m_globalTime); } void scheduleEventAbsolute(Consumer* consumer, Time timeAbs); void triggerEvents(Time t); // called to handle all events <= time t @@ -96,6 +96,7 @@ private: RubyEventQueue& operator=(const RubyEventQueue& obj); // Data Members (m_ prefix) + Tick m_clock; PrioHeap<RubyEventQueueNode>* m_prio_heap_ptr; Time m_globalTime; Time m_timeOfLastRecovery; |