summaryrefslogtreecommitdiff
path: root/configs/example
diff options
context:
space:
mode:
authorPau Cabre <pau.cabre@metempsy.com>2018-11-07 23:22:05 +0100
committerPau Cabre <pau.cabre@metempsy.com>2018-11-17 16:57:58 +0000
commit439b68a21e5122df2e6d1b9aad7ac46af619cc75 (patch)
tree75e58c5261518891b4435912545ce3bdd33b9ddb /configs/example
parentcb9fa244036772fc1d2c73fa2f4b10e98cd6e17a (diff)
downloadgem5-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/example')
-rw-r--r--configs/example/fs.py4
-rw-r--r--configs/example/se.py5
2 files changed, 9 insertions, 0 deletions
diff --git a/configs/example/fs.py b/configs/example/fs.py
index 3997ed76c..3fdf151c9 100644
--- a/configs/example/fs.py
+++ b/configs/example/fs.py
@@ -63,6 +63,7 @@ from common import Simulation
from common import CacheConfig
from common import MemConfig
from common import CpuConfig
+from common import BPConfig
from common.Caches import *
from common import Options
@@ -199,6 +200,9 @@ def build_test_system(np):
test_sys.cpu[i].addSimPointProbe(options.simpoint_interval)
if options.checker:
test_sys.cpu[i].addCheckerCpu()
+ if options.bp_type:
+ bpClass = BPConfig.get(options.bp_type)
+ test_sys.cpu[i].branchPred = bpClass()
test_sys.cpu[i].createThreads()
# If elastic tracing is enabled when not restoring from checkpoint and
diff --git a/configs/example/se.py b/configs/example/se.py
index f12d4a994..8403066f0 100644
--- a/configs/example/se.py
+++ b/configs/example/se.py
@@ -61,6 +61,7 @@ from common import Options
from common import Simulation
from common import CacheConfig
from common import CpuConfig
+from common import BPConfig
from common import MemConfig
from common.Caches import *
from common.cpu2000 import *
@@ -233,6 +234,10 @@ for i in xrange(np):
if options.checker:
system.cpu[i].addCheckerCpu()
+ if options.bp_type:
+ bpClass = BPConfig.get(options.bp_type)
+ system.cpu[i].branchPred = bpClass()
+
system.cpu[i].createThreads()
if options.ruby: