ruby: replaces Time with Cycles in many places
The patch started of with replacing Time with Cycles in the Consumer class. But to get ruby to compile, the rest of the changes had to be carried out. Subsequent patches will further this process, till we completely replace Time with Cycles.
This commit is contained in:
@@ -29,13 +29,14 @@
|
||||
#include "mem/ruby/common/Consumer.hh"
|
||||
|
||||
void
|
||||
Consumer::scheduleEvent(Time timeDelta)
|
||||
Consumer::scheduleEvent(Cycles timeDelta)
|
||||
{
|
||||
scheduleEventAbsolute(timeDelta + em->curCycle());
|
||||
timeDelta += em->curCycle();
|
||||
scheduleEventAbsolute(timeDelta);
|
||||
}
|
||||
|
||||
void
|
||||
Consumer::scheduleEventAbsolute(Time timeAbs)
|
||||
Consumer::scheduleEventAbsolute(Cycles timeAbs)
|
||||
{
|
||||
Tick evt_time = em->clockPeriod() * timeAbs;
|
||||
if (!alreadyScheduled(evt_time)) {
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include <iostream>
|
||||
#include <set>
|
||||
|
||||
#include "mem/ruby/common/TypeDefines.hh"
|
||||
#include "sim/clocked_object.hh"
|
||||
|
||||
class Consumer
|
||||
@@ -88,8 +87,8 @@ class Consumer
|
||||
m_scheduled_wakeups.erase(time);
|
||||
}
|
||||
|
||||
void scheduleEvent(Time timeDelta);
|
||||
void scheduleEventAbsolute(Time timeAbs);
|
||||
void scheduleEvent(Cycles timeDelta);
|
||||
void scheduleEventAbsolute(Cycles timeAbs);
|
||||
|
||||
private:
|
||||
Tick m_last_scheduled_wakeup;
|
||||
|
||||
Reference in New Issue
Block a user