summaryrefslogtreecommitdiff
path: root/configs/common/Options.py
diff options
context:
space:
mode:
Diffstat (limited to 'configs/common/Options.py')
-rw-r--r--configs/common/Options.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/configs/common/Options.py b/configs/common/Options.py
index c36dc384e..536da44f0 100644
--- a/configs/common/Options.py
+++ b/configs/common/Options.py
@@ -44,6 +44,7 @@ from m5.objects import *
from common.Benchmarks import *
from common import CpuConfig
+from common import BPConfig
from common import MemConfig
from common import PlatformConfig
@@ -51,6 +52,10 @@ def _listCpuTypes(option, opt, value, parser):
CpuConfig.print_cpu_list()
sys.exit(0)
+def _listBPTypes(option, opt, value, parser):
+ BPConfig.print_bp_list()
+ sys.exit(0)
+
def _listMemTypes(option, opt, value, parser):
MemConfig.print_mem_list()
sys.exit(0)
@@ -146,6 +151,15 @@ def addCommonOptions(parser):
parser.add_option("--cpu-type", type="choice", default="AtomicSimpleCPU",
choices=CpuConfig.cpu_names(),
help = "type of cpu to run with")
+ parser.add_option("--list-bp-types",
+ action="callback", callback=_listBPTypes,
+ help="List available 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("--checker", action="store_true");
parser.add_option("--cpu-clock", action="store", type="string",
default='2GHz',