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.
This commit is contained in:
Sascha Bischoff
2013-05-30 12:54:08 -04:00
parent 04ccc79134
commit 6f4be9bd4c

View File

@@ -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,