projects
/
gem5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ruby: drop NetworkMessage class
[gem5.git]
/
src
/
mem
/
ruby
/
common
/
Consumer.cc
diff --git
a/src/mem/ruby/common/Consumer.cc
b/src/mem/ruby/common/Consumer.cc
index a829f4d998e79dff65e16924c7e645119f58386a..59605d51b70f26b63137f0e1977fe1b90618acf2 100644
(file)
--- a/
src/mem/ruby/common/Consumer.cc
+++ b/
src/mem/ruby/common/Consumer.cc
@@
-28,22
+28,26
@@
#include "mem/ruby/common/Consumer.hh"
#include "mem/ruby/common/Consumer.hh"
+using namespace std;
+
void
void
-Consumer::scheduleEvent(
Time
timeDelta)
+Consumer::scheduleEvent(
Cycles
timeDelta)
{
{
- scheduleEventAbsolute(
timeDelta + em->curCycle(
));
+ scheduleEventAbsolute(
em->clockEdge(timeDelta
));
}
void
}
void
-Consumer::scheduleEventAbsolute(Ti
me timeAbs
)
+Consumer::scheduleEventAbsolute(Ti
ck evt_time
)
{
{
- Tick evt_time = em->clockPeriod() * timeAbs;
if (!alreadyScheduled(evt_time)) {
// This wakeup is not redundant
ConsumerEvent *evt = new ConsumerEvent(this);
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);
}
em->schedule(evt, evt_time);
insertScheduledWakeupTime(evt_time);
}
+
+ Tick t = em->clockEdge();
+ set<Tick>::iterator bit = m_scheduled_wakeups.begin();
+ set<Tick>::iterator eit = m_scheduled_wakeups.lower_bound(t);
+ m_scheduled_wakeups.erase(bit,eit);
}
}