summaryrefslogtreecommitdiff
path: root/configs/common/Options.py
diff options
context:
space:
mode:
authorJairo Balart <jairo.balart@metempsy.com>2019-01-07 07:45:14 +0100
committerJairo Balart <jairo.balart@metempsy.com>2019-05-13 11:44:08 +0000
commite541767279f7d8b47f9892145a02f1f5c859be89 (patch)
tree2033b6794d3146cb13deb95c31eea862b52c85bf /configs/common/Options.py
parent0473f8f65f8c70ddaf55e9f90b99631a9baacaa7 (diff)
downloadgem5-e541767279f7d8b47f9892145a02f1f5c859be89.tar.xz
config: add an option to list and select indirect branch predictor
Change-Id: I9a855d36de7d95b7785ff8a897899037cea6a3d8 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/15320 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'configs/common/Options.py')
-rw-r--r--configs/common/Options.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/configs/common/Options.py b/configs/common/Options.py
index e0d691f6b..4279b8006 100644
--- a/configs/common/Options.py
+++ b/configs/common/Options.py
@@ -64,6 +64,10 @@ def _listHWPTypes(option, opt, value, parser):
HWPConfig.print_hwp_list()
sys.exit(0)
+def _listIndirectBPTypes(option, opt, value, parser):
+ BPConfig.print_indirect_bp_list()
+ sys.exit(0)
+
def _listMemTypes(option, opt, value, parser):
MemConfig.print_mem_list()
sys.exit(0)
@@ -162,12 +166,19 @@ def addCommonOptions(parser):
parser.add_option("--list-bp-types",
action="callback", callback=_listBPTypes,
help="List available branch predictor types")
+ parser.add_option("--list-indirect-bp-types",
+ action="callback", callback=_listIndirectBPTypes,
+ help="List available indirect branch predictor types")
parser.add_option("--bp-type", type="choice", default=None,
choices=BPConfig.bp_names(),
help = """
type of branch predictor to run with
(if not set, use the default branch predictor of
the selected CPU)""")
+ parser.add_option("--indirect-bp-type", type="choice",
+ default="SimpleIndirectPredictor",
+ choices=BPConfig.indirect_bp_names(),
+ help = "type of indirect branch predictor to run with")
parser.add_option("--list-hwp-types",
action="callback", callback=_listHWPTypes,
help="List available hardware prefetcher types")