diff options
author | Pau Cabre <pau.cabre@metempsy.com> | 2018-11-07 23:22:05 +0100 |
---|---|---|
committer | Pau Cabre <pau.cabre@metempsy.com> | 2018-11-17 16:57:58 +0000 |
commit | 439b68a21e5122df2e6d1b9aad7ac46af619cc75 (patch) | |
tree | 75e58c5261518891b4435912545ce3bdd33b9ddb /configs/common/Simulation.py | |
parent | cb9fa244036772fc1d2c73fa2f4b10e98cd6e17a (diff) | |
download | gem5-439b68a21e5122df2e6d1b9aad7ac46af619cc75.tar.xz |
configs: Added an option for choosing branch predictor type
Added the parameter "--bp-type" to set the branch predictor type
Added the parameter "--list-bp-types" to list all the available branch
predictor types
Change-Id: Ia6aae90c784aef359b6d8233c8383cd7a871aca1
Signed-off-by: Pau Cabre <pau.cabre@metempsy.com>
Reviewed-on: https://gem5-review.googlesource.com/c/14015
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'configs/common/Simulation.py')
-rw-r--r-- | configs/common/Simulation.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/configs/common/Simulation.py b/configs/common/Simulation.py index 23a778397..19bd962e8 100644 --- a/configs/common/Simulation.py +++ b/configs/common/Simulation.py @@ -46,6 +46,7 @@ from os import getcwd from os.path import join as joinpath from common import CpuConfig +from common import BPConfig from common import MemConfig import m5 @@ -478,6 +479,9 @@ def run(options, root, testsys, cpu_class): # Add checker cpu if selected if options.checker: switch_cpus[i].addCheckerCpu() + if options.bp_type: + bpClass = BPConfig.get(options.bp_type) + switch_cpus[i].branchPred = bpClass() # If elastic tracing is enabled attach the elastic trace probe # to the switch CPUs |