-# Copyright (c) 2012 ARM Limited
+# Copyright (c) 2012, 2016 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# are not immediately accepted
elastic_req = Param.Bool(False,
"Slow down requests in case of backpressure")
+
+ # Let the user know if we have waited for a retry and not made any
+ # progress for a long period of time. The default value is
+ # somewhat arbitrary and may well have to be tuned.
+ progress_check = Param.Latency('1ms', "Time before exiting " \
+ "due to lack of progress")
/*
- * 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
masterID(system->getMasterId(name())),
configFile(p->config_file),
elasticReq(p->elastic_req),
+ progressCheck(p->progress_check),
+ noProgressEvent(this),
nextTransitionTick(0),
nextPacketTick(0),
currState(0),
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) {
}
}
+void
+TrafficGen::noProgress()
+{
+ fatal("TrafficGen %s spent %llu ticks without making progress",
+ name(), progressCheck);
+}
+
void
TrafficGen::regStats()
{
/*
- * 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
*/
void recvReqRetry();
+ /**
+ * Method to inform the user we have made no progress.
+ */
+ void noProgress();
+
/** Struct to represent a probabilistic transition during parsing. */
struct Transition {
uint32_t from;
*/
const bool elasticReq;
+ /**
+ * Time to tolerate waiting for retries (not making progress),
+ * until we declare things broken.
+ */
+ const Tick progressCheck;
+
+ /**
+ * Event to keep track of our progress, or lack thereof.
+ */
+ EventWrapper<TrafficGen, &TrafficGen::noProgress> noProgressEvent;
+
/** Time of next transition */
Tick nextTransitionTick;