diff options
Diffstat (limited to 'src/mem/ruby/common')
-rw-r--r-- | src/mem/ruby/common/Consumer.cc | 8 | ||||
-rw-r--r-- | src/mem/ruby/common/Consumer.hh | 4 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/mem/ruby/common/Consumer.cc b/src/mem/ruby/common/Consumer.cc index b7d31ccb0..9f3735709 100644 --- a/src/mem/ruby/common/Consumer.cc +++ b/src/mem/ruby/common/Consumer.cc @@ -31,19 +31,15 @@ void Consumer::scheduleEvent(Cycles timeDelta) { - timeDelta += em->curCycle(); - scheduleEventAbsolute(timeDelta); + scheduleEventAbsolute(em->clockEdge(timeDelta)); } void -Consumer::scheduleEventAbsolute(Cycles timeAbs) +Consumer::scheduleEventAbsolute(Tick evt_time) { - Tick evt_time = em->clockPeriod() * timeAbs; if (!alreadyScheduled(evt_time)) { // This wakeup is not redundant ConsumerEvent *evt = new ConsumerEvent(this); - assert(timeAbs > em->curCycle()); - em->schedule(evt, evt_time); insertScheduledWakeupTime(evt_time); } diff --git a/src/mem/ruby/common/Consumer.hh b/src/mem/ruby/common/Consumer.hh index c1b4d70b1..57ee69f3e 100644 --- a/src/mem/ruby/common/Consumer.hh +++ b/src/mem/ruby/common/Consumer.hh @@ -87,8 +87,10 @@ class Consumer m_scheduled_wakeups.erase(time); } + void scheduleEventAbsolute(Tick timeAbs); + + protected: void scheduleEvent(Cycles timeDelta); - void scheduleEventAbsolute(Cycles timeAbs); private: Tick m_last_scheduled_wakeup; |