summaryrefslogtreecommitdiff
path: root/src/mem/ruby/eventqueue/RubyEventQueue.hh
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:19 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:19 -0800
commite15abd17f92db574dfcbf3798f6352712f897ebc (patch)
tree67fe9c3b3c470c4c27837d7cfcc16e03be8f6015 /src/mem/ruby/eventqueue/RubyEventQueue.hh
parent63a60cc81ecd94d1a5ea4edb2a1c90de0e9eda80 (diff)
downloadgem5-e15abd17f92db574dfcbf3798f6352712f897ebc.tar.xz
ruby: Wrapped ruby events into m5 events
Wrapped ruby events using the m5 event object. Removed the prio_heap from ruby's event queue and instead schedule ruby events on the m5 event queue.
Diffstat (limited to 'src/mem/ruby/eventqueue/RubyEventQueue.hh')
-rw-r--r--src/mem/ruby/eventqueue/RubyEventQueue.hh18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/mem/ruby/eventqueue/RubyEventQueue.hh b/src/mem/ruby/eventqueue/RubyEventQueue.hh
index 8bd74a36e..36aa4843e 100644
--- a/src/mem/ruby/eventqueue/RubyEventQueue.hh
+++ b/src/mem/ruby/eventqueue/RubyEventQueue.hh
@@ -62,15 +62,16 @@
#include "config/no_vector_bounds_checks.hh"
#include "mem/ruby/common/Global.hh"
#include "mem/gems_common/Vector.hh"
+#include "sim/eventq.hh"
class Consumer;
template <class TYPE> class PrioHeap;
class RubyEventQueueNode;
-class RubyEventQueue {
+class RubyEventQueue : public EventManager {
public:
// Constructors
- RubyEventQueue(Tick clock);
+ RubyEventQueue(EventQueue* eventq, Tick _clock);
// Destructor
~RubyEventQueue();
@@ -78,28 +79,21 @@ public:
// Public Methods
Time getTime() const { return curTick/m_clock; }
- void scheduleEvent(Consumer* consumer, Time timeDelta) { scheduleEventAbsolute(consumer, timeDelta + m_globalTime); }
+ void scheduleEvent(Consumer* consumer, Time timeDelta);
void scheduleEventAbsolute(Consumer* consumer, Time timeAbs);
- void triggerEvents(Time t); // called to handle all events <= time t
- void triggerAllEvents();
void print(ostream& out) const;
- bool isEmpty() const;
- Time getTimeOfLastRecovery() {return m_timeOfLastRecovery;}
- void setTimeOfLastRecovery(Time t) {m_timeOfLastRecovery = t;}
+ void triggerEvents(Time t) { assert(0); }
+ void triggerAllEvents() { assert(0); }
// Private Methods
private:
// Private copy constructor and assignment operator
- void init();
RubyEventQueue(const RubyEventQueue& obj);
RubyEventQueue& operator=(const RubyEventQueue& obj);
// Data Members (m_ prefix)
Tick m_clock;
- PrioHeap<RubyEventQueueNode>* m_prio_heap_ptr;
- Time m_globalTime;
- Time m_timeOfLastRecovery;
};
// Output operator declaration