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:
Nilay Vaish
2013-02-10 21:26:24 -06:00
parent affd77ea77
commit d3aebe1f91
67 changed files with 218 additions and 199 deletions

View File

@@ -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)) {

View File

@@ -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;