summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system/RubyMemoryControl.cc
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2013-02-10 21:26:25 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2013-02-10 21:26:25 -0600
commitb742081cc13f31bb5ebb10739a2e37727d80a085 (patch)
treee76014a9cfcbbeb01c6b8998c8affba14f4933d3 /src/mem/ruby/system/RubyMemoryControl.cc
parent89f86dbd282066595f90a2163140b347f84aee44 (diff)
downloadgem5-b742081cc13f31bb5ebb10739a2e37727d80a085.tar.xz
ruby: replace Time with Cycles in Memory Controller
Diffstat (limited to 'src/mem/ruby/system/RubyMemoryControl.cc')
-rw-r--r--src/mem/ruby/system/RubyMemoryControl.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mem/ruby/system/RubyMemoryControl.cc b/src/mem/ruby/system/RubyMemoryControl.cc
index 121551299..542835102 100644
--- a/src/mem/ruby/system/RubyMemoryControl.cc
+++ b/src/mem/ruby/system/RubyMemoryControl.cc
@@ -276,10 +276,9 @@ RubyMemoryControl::~RubyMemoryControl()
// enqueue new request from directory
void
-RubyMemoryControl::enqueue(const MsgPtr& message, int latency)
+RubyMemoryControl::enqueue(const MsgPtr& message, Cycles latency)
{
- Time current_time = g_system_ptr->getTime();
- Time arrival_time = current_time + latency;
+ Cycles arrival_time = g_system_ptr->getTime() + latency;
const MemoryMsg* memMess = safe_cast<const MemoryMsg*>(message.get());
physical_address_t addr = memMess->getAddress().getAddress();
MemoryRequestType type = memMess->getType();
@@ -376,14 +375,13 @@ RubyMemoryControl::printStats(ostream& out) const
void
RubyMemoryControl::enqueueToDirectory(MemoryNode req, Cycles latency)
{
- Time arrival_time = curTick() + (latency * clock);
+ Tick arrival_time = clockEdge(latency);
Cycles ruby_arrival_time = g_system_ptr->ticksToCycles(arrival_time);
req.m_time = ruby_arrival_time;
m_response_queue.push_back(req);
DPRINTF(RubyMemory, "Enqueueing msg %#08x %c back to directory at %15d\n",
- req.m_addr, req.m_is_mem_read ? 'R':'W',
- arrival_time);
+ req.m_addr, req.m_is_mem_read ? 'R':'W', arrival_time);
// schedule the wake up
m_consumer_ptr->scheduleEventAbsolute(ruby_arrival_time);