summaryrefslogtreecommitdiff
path: root/src/cpu/testers/traffic_gen/traffic_gen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/testers/traffic_gen/traffic_gen.cc')
-rw-r--r--src/cpu/testers/traffic_gen/traffic_gen.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/cpu/testers/traffic_gen/traffic_gen.cc b/src/cpu/testers/traffic_gen/traffic_gen.cc
index a405351ed..fbb26baa8 100644
--- a/src/cpu/testers/traffic_gen/traffic_gen.cc
+++ b/src/cpu/testers/traffic_gen/traffic_gen.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2013 ARM Limited
+ * Copyright (c) 2012-2013, 2016 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -57,6 +57,8 @@ TrafficGen::TrafficGen(const TrafficGenParams* p)
masterID(system->getMasterId(name())),
configFile(p->config_file),
elasticReq(p->elastic_req),
+ progressCheck(p->progress_check),
+ noProgressEvent(this),
nextTransitionTick(0),
nextPacketTick(0),
currState(0),
@@ -179,6 +181,9 @@ TrafficGen::unserialize(CheckpointIn &cp)
void
TrafficGen::update()
{
+ // shift our progress-tracking event forward
+ reschedule(noProgressEvent, curTick() + progressCheck, true);
+
// if we have reached the time for the next state transition, then
// perform the transition
if (curTick() >= nextTransitionTick) {
@@ -512,6 +517,13 @@ TrafficGen::recvReqRetry()
}
void
+TrafficGen::noProgress()
+{
+ fatal("TrafficGen %s spent %llu ticks without making progress",
+ name(), progressCheck);
+}
+
+void
TrafficGen::regStats()
{
// Initialise all the stats