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.
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
* Andreas Hansson
|
||||
*/
|
||||
|
||||
#include "base/trace.hh"
|
||||
#include "debug/CommMonitor.hh"
|
||||
#include "mem/comm_monitor.hh"
|
||||
#include "sim/stats.hh"
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
* Andreas Hansson
|
||||
*/
|
||||
|
||||
#include "base/trace.hh"
|
||||
#include "debug/Drain.hh"
|
||||
#include "debug/PacketQueue.hh"
|
||||
#include "mem/packet_queue.hh"
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
#include <list>
|
||||
|
||||
#include "mem/port.hh"
|
||||
#include "sim/eventq.hh"
|
||||
#include "sim/drain.hh"
|
||||
#include "sim/eventq_impl.hh"
|
||||
|
||||
/**
|
||||
* A packet queue is a class that holds deferred packets and later
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "base/trace.hh"
|
||||
#include "debug/BusAddrRanges.hh"
|
||||
#include "debug/Checkpoint.hh"
|
||||
#include "mem/abstract_mem.hh"
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "base/trace.hh"
|
||||
#include "debug/RubyNetwork.hh"
|
||||
#include "mem/protocol/MachineType.hh"
|
||||
#include "mem/ruby/common/NetDest.hh"
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
* Ani Udipi
|
||||
*/
|
||||
|
||||
#include "base/trace.hh"
|
||||
#include "debug/Drain.hh"
|
||||
#include "debug/DRAM.hh"
|
||||
#include "debug/DRAMWR.hh"
|
||||
|
||||
Reference in New Issue
Block a user