diff options
author | Sascha Bischoff <sascha.bischoff@arm.com> | 2013-05-30 12:54:08 -0400 |
---|---|---|
committer | Sascha Bischoff <sascha.bischoff@arm.com> | 2013-05-30 12:54:08 -0400 |
commit | 6f4be9bd4ca74fa3d20e103fc8316492963c3167 (patch) | |
tree | 740069a4c395beece164867d900a2f7ab671bde1 /src | |
parent | 04ccc79134d7752b97a36cb922d56c9d450983f9 (diff) | |
download | gem5-6f4be9bd4ca74fa3d20e103fc8316492963c3167.tar.xz |
cpu: Check that minimum TrafficGen period is less than max period
Add a check which ensures that the minumum period for the LINEAR and
RANDOM traffic generator states is less than or equal to the maximum
period. If the minimum period is greater than the maximum period a
fatal is triggered.
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/testers/traffic_gen/traffic_gen.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cpu/testers/traffic_gen/traffic_gen.cc b/src/cpu/testers/traffic_gen/traffic_gen.cc index cb2e6e7bb..ed3518bb4 100644 --- a/src/cpu/testers/traffic_gen/traffic_gen.cc +++ b/src/cpu/testers/traffic_gen/traffic_gen.cc @@ -277,6 +277,9 @@ TrafficGen::parseConfig() if (read_percent > 100) fatal("%s cannot have more than 100% reads", name()); + if (min_period > max_period) + fatal("%s cannot have min_period > max_period", name()); + if (mode == "LINEAR") { states[id] = new LinearGen(name(), masterID, duration, start_addr, |