summaryrefslogtreecommitdiff
path: root/src/cpu/testers/traffic_gen/TrafficGen.py
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2013-05-30 12:54:06 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2013-05-30 12:54:06 -0400
commitfc09bc8678b5e78d553e009105c58e5c5d5befb4 (patch)
tree6d5ff719387cd2e24d549f575576589dbfd98f6e /src/cpu/testers/traffic_gen/TrafficGen.py
parent4931414ca79b97ee64a958c4dd4ed1cafc44b4bd (diff)
downloadgem5-fc09bc8678b5e78d553e009105c58e5c5d5befb4.tar.xz
cpu: Add request elasticity to the traffic generator
This patch adds an optional request elasticity to the traffic generator, effectievly compensating for it in the case of the linear and random generators, and adding it in the case of the trace generator. The accounting is left with the top-level traffic generator, and the individual generators do the necessary math as part of determining the next packet tick. Note that in the linear and random generators we have to compensate for the blocked time to not be elastic, i.e. without this patch the aforementioned generators will slow down in the case of back-pressure.
Diffstat (limited to 'src/cpu/testers/traffic_gen/TrafficGen.py')
-rw-r--r--src/cpu/testers/traffic_gen/TrafficGen.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cpu/testers/traffic_gen/TrafficGen.py b/src/cpu/testers/traffic_gen/TrafficGen.py
index 916279f91..f29cedb3a 100644
--- a/src/cpu/testers/traffic_gen/TrafficGen.py
+++ b/src/cpu/testers/traffic_gen/TrafficGen.py
@@ -71,3 +71,9 @@ class TrafficGen(MemObject):
# System used to determine the mode of the memory system
system = Param.System(Parent.any, "System this generator is part of")
+
+ # Should requests respond to back-pressure or not, if true, the
+ # rate of the traffic generator will be slowed down if requests
+ # are not immediately accepted
+ elastic_req = Param.Bool(False,
+ "Slow down requests in case of backpressure")