diff options
author | Riken Gohil <Riken.Gohil@arm.com> | 2017-08-01 11:08:16 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2017-12-19 13:14:51 +0000 |
commit | d17e77f1f6075583d5b973030d2b68557d50f1b5 (patch) | |
tree | f3cc0a83d68985eef47bbacbf20291ca23a084b3 /src/cpu/testers/traffic_gen/traffic_gen.cc | |
parent | 2a8e7a9ee62ec5caf1c08817005466c10a04c6e3 (diff) | |
download | gem5-d17e77f1f6075583d5b973030d2b68557d50f1b5.tar.xz |
cpu-tester: Added ExitGen to TrafficGen
Added the ExitGen to the TrafficGenerator which allows an EXIT
state to be added to the TrafficGen configuration file. Entering this
state will cause the simulation to exit immediately. Please note that
if multiple TrafficGen instances have an EXIT state, the first of these
to be encountered will cause the simulation to terminate.
Change-Id: Ieea51f05ffb780771f007787a2b119f79143d0c1
Reviewed-by: Sascha Bischoff <sascha.bischoff@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5723
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/cpu/testers/traffic_gen/traffic_gen.cc')
-rw-r--r-- | src/cpu/testers/traffic_gen/traffic_gen.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cpu/testers/traffic_gen/traffic_gen.cc b/src/cpu/testers/traffic_gen/traffic_gen.cc index 9d8732902..7668c5141 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, 2016 ARM Limited + * Copyright (c) 2012-2013, 2016-2017 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -305,6 +305,9 @@ TrafficGen::parseConfig() } else if (mode == "IDLE") { states[id] = new IdleGen(name(), masterID, duration); DPRINTF(TrafficGen, "State: %d IdleGen\n", id); + } else if (mode == "EXIT") { + states[id] = new ExitGen(name(), masterID, duration); + DPRINTF(TrafficGen, "State: %d ExitGen\n", id); } else if (mode == "LINEAR" || mode == "RANDOM" || mode == "DRAM" || mode == "DRAM_ROTATE") { uint32_t read_percent; |