From 2d6470936ca06310b213117159fa0010259708cd Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Fri, 16 Nov 2012 10:27:47 -0600 Subject: sim: have a curTick per eventq This patch adds a _curTick variable to an eventq. This variable is updated whenever an event is serviced in function serviceOne(), or all events upto a particular time are processed in function serviceEvents(). This change helps when there are eventqs that do not make use of curTick for scheduling events. --- src/mem/ruby/system/System.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mem/ruby/system') diff --git a/src/mem/ruby/system/System.cc b/src/mem/ruby/system/System.cc index 65bad07b3..6a0721217 100644 --- a/src/mem/ruby/system/System.cc +++ b/src/mem/ruby/system/System.cc @@ -226,7 +226,7 @@ RubySystem::serialize(std::ostream &os) // Restore eventq head eventq_head = eventq->replaceHead(eventq_head); // Restore curTick - curTick(curtick_original); + setCurTick(curtick_original); uint8_t *raw_data = NULL; @@ -357,7 +357,7 @@ RubySystem::startup() // save the event queue head Event* eventq_head = eventq->replaceHead(NULL); // set curTick to 0 and reset Ruby System's clock - curTick(0); + setCurTick(0); resetClock(); // Schedule an event to start cache warmup @@ -377,7 +377,7 @@ RubySystem::startup() // Restore eventq head eventq_head = eventq->replaceHead(eventq_head); // Restore curTick and Ruby System's clock - curTick(curtick_original); + setCurTick(curtick_original); resetClock(); } } -- cgit v1.2.3