Options.py revision 14038
12292SN/A# Copyright (c) 2013 ARM Limited 28948Sandreas.hansson@arm.com# All rights reserved. 38707Sandreas.hansson@arm.com# 48707Sandreas.hansson@arm.com# The license below extends only to copyright in the software and shall 58707Sandreas.hansson@arm.com# not be construed as granting a license to any other intellectual 68707Sandreas.hansson@arm.com# property including but not limited to intellectual property relating 78707Sandreas.hansson@arm.com# to a hardware implementation of the functionality of the software 88707Sandreas.hansson@arm.com# licensed hereunder. You may use the software subject to the license 98707Sandreas.hansson@arm.com# terms below provided that you ensure that this notice is replicated 108707Sandreas.hansson@arm.com# unmodified and in its entirety in all distributions of the software, 118707Sandreas.hansson@arm.com# modified or unmodified, in source code or in binary form. 128707Sandreas.hansson@arm.com# 138707Sandreas.hansson@arm.com# Copyright (c) 2006-2008 The Regents of The University of Michigan 142727Sktlim@umich.edu# All rights reserved. 152292SN/A# 162292SN/A# Redistribution and use in source and binary forms, with or without 172292SN/A# modification, are permitted provided that the following conditions are 182292SN/A# met: redistributions of source code must retain the above copyright 192292SN/A# notice, this list of conditions and the following disclaimer; 202292SN/A# redistributions in binary form must reproduce the above copyright 212292SN/A# notice, this list of conditions and the following disclaimer in the 222292SN/A# documentation and/or other materials provided with the distribution; 232292SN/A# neither the name of the copyright holders nor the names of its 242292SN/A# contributors may be used to endorse or promote products derived from 252292SN/A# this software without specific prior written permission. 262292SN/A# 272292SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 282292SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 292292SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 302292SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 312292SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 322292SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 332292SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 342292SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 352292SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 362292SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 372292SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 382292SN/A# 392689Sktlim@umich.edu# Authors: Lisa Hsu 402689Sktlim@umich.edu 412292SN/Afrom __future__ import print_function 422292SN/Afrom __future__ import absolute_import 432329SN/A 442980Sgblack@eecs.umich.eduimport m5 452329SN/Afrom m5.defines import buildEnv 462329SN/Afrom m5.objects import * 472292SN/A 489444SAndreas.Sandberg@ARM.comfrom .Benchmarks import * 498232Snate@binkert.orgfrom . import CpuConfig 508232Snate@binkert.orgfrom . import BPConfig 518232Snate@binkert.orgfrom . import HWPConfig 526221Snate@binkert.orgfrom . import MemConfig 532292SN/Afrom . import PlatformConfig 546221Snate@binkert.org 555529Snate@binkert.orgdef _listCpuTypes(option, opt, value, parser): 562292SN/A CpuConfig.print_cpu_list() 575529Snate@binkert.org sys.exit(0) 588707Sandreas.hansson@arm.com 594329Sktlim@umich.edudef _listBPTypes(option, opt, value, parser): 604329Sktlim@umich.edu BPConfig.print_bp_list() 615529Snate@binkert.org sys.exit(0) 622907Sktlim@umich.edu 632292SN/Adef _listHWPTypes(option, opt, value, parser): 642292SN/A HWPConfig.print_hwp_list() 652292SN/A sys.exit(0) 662292SN/A 672980Sgblack@eecs.umich.edudef _listIndirectBPTypes(option, opt, value, parser): 682292SN/A BPConfig.print_indirect_bp_list() 692292SN/A sys.exit(0) 702292SN/A 712292SN/Adef _listMemTypes(option, opt, value, parser): 722292SN/A MemConfig.print_mem_list() 732292SN/A sys.exit(0) 742292SN/A 752292SN/Adef _listPlatformTypes(option, opt, value, parser): 762292SN/A PlatformConfig.print_platform_list() 772292SN/A sys.exit(0) 782292SN/A 794329Sktlim@umich.edu# Add the very basic options that work also in the case of the no ISA 802292SN/A# being used, and consequently no CPUs, but rather various types of 812292SN/A# testers and traffic generators. 822292SN/Adef addNoISAOptions(parser): 832292SN/A parser.add_option("-n", "--num-cpus", type="int", default=1) 842292SN/A parser.add_option("--sys-voltage", action="store", type="string", 852292SN/A default='1.0V', 862292SN/A help = """Top-level voltage for blocks running at system 874329Sktlim@umich.edu power supply""") 882292SN/A parser.add_option("--sys-clock", action="store", type="string", 898346Sksewell@umich.edu default='1GHz', 902292SN/A help = """Top-level clock for blocks running at system 912292SN/A speed""") 922292SN/A 932292SN/A # Memory Options 942292SN/A parser.add_option("--list-mem-types", 952292SN/A action="callback", callback=_listMemTypes, 962292SN/A help="List available memory types") 972292SN/A parser.add_option("--mem-type", type="choice", default="DDR3_1600_8x8", 982292SN/A choices=MemConfig.mem_names(), 992292SN/A help = "type of memory to use") 1002292SN/A parser.add_option("--mem-channels", type="int", default=1, 1012292SN/A help = "number of memory channels") 1024329Sktlim@umich.edu parser.add_option("--mem-ranks", type="int", default=None, 1032292SN/A help = "number of memory ranks per channel") 1048346Sksewell@umich.edu parser.add_option("--mem-size", action="store", type="string", 1052292SN/A default="512MB", 1062292SN/A help="Specify the physical memory size (single memory)") 1072292SN/A parser.add_option("--enable-dram-powerdown", action="store_true", 1082292SN/A help="Enable low-power states in DRAMCtrl") 1092292SN/A 1102292SN/A 1112292SN/A parser.add_option("--memchecker", action="store_true") 1126221Snate@binkert.org 1134329Sktlim@umich.edu # Cache Options 1144329Sktlim@umich.edu parser.add_option("--external-memory-system", type="string", 1158850Sandreas.hansson@arm.com help="use external ports of this port_type for caches") 1162292SN/A parser.add_option("--tlm-memory", type="string", 1172292SN/A help="use external port for SystemC TLM cosimulation") 1182292SN/A parser.add_option("--caches", action="store_true") 1192292SN/A parser.add_option("--l2cache", action="store_true") 1202292SN/A parser.add_option("--num-dirs", type="int", default=1) 1212292SN/A parser.add_option("--num-l2caches", type="int", default=1) 1222292SN/A parser.add_option("--num-l3caches", type="int", default=1) 1232292SN/A parser.add_option("--l1d_size", type="string", default="64kB") 1242292SN/A parser.add_option("--l1i_size", type="string", default="32kB") 1252292SN/A parser.add_option("--l2_size", type="string", default="2MB") 1262292SN/A parser.add_option("--l3_size", type="string", default="16MB") 1272292SN/A parser.add_option("--l1d_assoc", type="int", default=2) 1282292SN/A parser.add_option("--l1i_assoc", type="int", default=2) 1292727Sktlim@umich.edu parser.add_option("--l2_assoc", type="int", default=8) 1302727Sktlim@umich.edu parser.add_option("--l3_assoc", type="int", default=16) 1312727Sktlim@umich.edu parser.add_option("--cacheline_size", type="int", default=64) 1326221Snate@binkert.org 1332727Sktlim@umich.edu # Enable Ruby 1342727Sktlim@umich.edu parser.add_option("--ruby", action="store_true") 1352727Sktlim@umich.edu 1362727Sktlim@umich.edu # Run duration options 1372727Sktlim@umich.edu parser.add_option("-m", "--abs-max-tick", type="int", default=m5.MaxTick, 1382727Sktlim@umich.edu metavar="TICKS", help="Run to absolute simulated tick " 1396221Snate@binkert.org "specified including ticks from a restored checkpoint") 1402292SN/A parser.add_option("--rel-max-tick", type="int", default=None, 1412292SN/A metavar="TICKS", help="Simulate for specified number of" 1422292SN/A " ticks relative to the simulation start tick (e.g. if " 1432292SN/A "restoring a checkpoint)") 1442292SN/A parser.add_option("--maxtime", type="float", default=None, 1452292SN/A help="Run to the specified absolute simulated time in " 1462307SN/A "seconds") 1479444SAndreas.Sandberg@ARM.com parser.add_option("-P", "--param", action="append", default=[], 1482307SN/A help="Set a SimObject parameter relative to the root node. " 1499444SAndreas.Sandberg@ARM.com "An extended Python multi range slicing syntax can be used " 1509444SAndreas.Sandberg@ARM.com "for arrays. For example: " 1519444SAndreas.Sandberg@ARM.com "'system.cpu[0,1,3:8:2].max_insts_all_threads = 42' " 1529444SAndreas.Sandberg@ARM.com "sets max_insts_all_threads for cpus 0, 1, 3, 5 and 7 " 1539444SAndreas.Sandberg@ARM.com "Direct parameters of the root object are not accessible, " 1549444SAndreas.Sandberg@ARM.com "only parameters of its children.") 1559444SAndreas.Sandberg@ARM.com 1569444SAndreas.Sandberg@ARM.com# Add common options that assume a non-NULL ISA. 1579444SAndreas.Sandberg@ARM.comdef addCommonOptions(parser): 1589444SAndreas.Sandberg@ARM.com # start by adding the base options that do not assume an ISA 1599444SAndreas.Sandberg@ARM.com addNoISAOptions(parser) 1609444SAndreas.Sandberg@ARM.com 1619444SAndreas.Sandberg@ARM.com # system options 1629444SAndreas.Sandberg@ARM.com parser.add_option("--list-cpu-types", 1639444SAndreas.Sandberg@ARM.com action="callback", callback=_listCpuTypes, 1642307SN/A help="List available CPU types") 1659444SAndreas.Sandberg@ARM.com parser.add_option("--cpu-type", type="choice", default="AtomicSimpleCPU", 1669444SAndreas.Sandberg@ARM.com choices=CpuConfig.cpu_names(), 1679444SAndreas.Sandberg@ARM.com help = "type of cpu to run with") 1689444SAndreas.Sandberg@ARM.com parser.add_option("--list-bp-types", 1699444SAndreas.Sandberg@ARM.com action="callback", callback=_listBPTypes, 1709444SAndreas.Sandberg@ARM.com help="List available branch predictor types") 1719444SAndreas.Sandberg@ARM.com parser.add_option("--list-indirect-bp-types", 1729444SAndreas.Sandberg@ARM.com action="callback", callback=_listIndirectBPTypes, 1739444SAndreas.Sandberg@ARM.com help="List available indirect branch predictor types") 1749444SAndreas.Sandberg@ARM.com parser.add_option("--bp-type", type="choice", default=None, 1759444SAndreas.Sandberg@ARM.com choices=BPConfig.bp_names(), 1769444SAndreas.Sandberg@ARM.com help = """ 1772307SN/A type of branch predictor to run with 1782307SN/A (if not set, use the default branch predictor of 1792307SN/A the selected CPU)""") 1802307SN/A parser.add_option("--indirect-bp-type", type="choice", 1812307SN/A default="SimpleIndirectPredictor", 1822307SN/A choices=BPConfig.indirect_bp_names(), 1836221Snate@binkert.org help = "type of indirect branch predictor to run with") 1842307SN/A parser.add_option("--list-hwp-types", 1852307SN/A action="callback", callback=_listHWPTypes, 1862307SN/A help="List available hardware prefetcher types") 1872307SN/A parser.add_option("--l1i-hwp-type", type="choice", default=None, 1882307SN/A choices=HWPConfig.hwp_names(), 1892292SN/A help = """ 1906221Snate@binkert.org type of hardware prefetcher to use with the L1 1912292SN/A instruction cache. 1922292SN/A (if not set, use the default prefetcher of 1932292SN/A the selected cache)""") 1942292SN/A parser.add_option("--l1d-hwp-type", type="choice", default=None, 1952292SN/A choices=HWPConfig.hwp_names(), 1962292SN/A help = """ 1972292SN/A type of hardware prefetcher to use with the L1 1982292SN/A data cache. 1992292SN/A (if not set, use the default prefetcher of 2002292SN/A the selected cache)""") 2012292SN/A parser.add_option("--l2-hwp-type", type="choice", default=None, 2022292SN/A choices=HWPConfig.hwp_names(), 2032292SN/A help = """ 2043867Sbinkertn@umich.edu type of hardware prefetcher to use with the L2 cache. 2052292SN/A (if not set, use the default prefetcher of 2062292SN/A the selected cache)""") 2072292SN/A parser.add_option("--checker", action="store_true"); 2082292SN/A parser.add_option("--cpu-clock", action="store", type="string", 2092292SN/A default='2GHz', 2102292SN/A help="Clock for blocks running at CPU speed") 2112292SN/A parser.add_option("--smt", action="store_true", default=False, 2122292SN/A help = """ 2132292SN/A Only used if multiple programs are specified. If true, 2142292SN/A then the number of threads per cpu is same as the 2152292SN/A number of programs.""") 2166221Snate@binkert.org parser.add_option("--elastic-trace-en", action="store_true", 2176221Snate@binkert.org help="""Enable capture of data dependency and instruction 2183867Sbinkertn@umich.edu fetch traces using elastic trace probe.""") 2193867Sbinkertn@umich.edu # Trace file paths input to trace probe in a capture simulation and input 2206221Snate@binkert.org # to Trace CPU in a replay simulation 2213867Sbinkertn@umich.edu parser.add_option("--inst-trace-file", action="store", type="string", 2223867Sbinkertn@umich.edu help="""Instruction fetch trace file input to 2232292SN/A Elastic Trace probe in a capture simulation and 2242292SN/A Trace CPU in a replay simulation""", default="") 2252292SN/A parser.add_option("--data-trace-file", action="store", type="string", 2262292SN/A help="""Data dependency trace file input to 2272292SN/A Elastic Trace probe in a capture simulation and 2282292SN/A Trace CPU in a replay simulation""", default="") 2296221Snate@binkert.org 2302292SN/A parser.add_option("-l", "--lpae", action="store_true") 2312292SN/A parser.add_option("-V", "--virtualisation", action="store_true") 2322292SN/A 2332292SN/A # dist-gem5 options 2342292SN/A parser.add_option("--dist", action="store_true", 2352292SN/A help="Parallel distributed gem5 simulation.") 2362292SN/A parser.add_option("--dist-sync-on-pseudo-op", action="store_true", 2376221Snate@binkert.org help="Use a pseudo-op to start dist-gem5 synchronization.") 2382292SN/A parser.add_option("--is-switch", action="store_true", 2392292SN/A help="Select the network switch simulator process for a"\ 2402292SN/A "distributed gem5 run") 2412292SN/A parser.add_option("--dist-rank", default=0, action="store", type="int", 2422292SN/A help="Rank of this system within the dist gem5 run.") 2432292SN/A parser.add_option("--dist-size", default=0, action="store", type="int", 2442292SN/A help="Number of gem5 processes within the dist gem5 run.") 2452292SN/A parser.add_option("--dist-server-name", 2462292SN/A default="127.0.0.1", 2476221Snate@binkert.org action="store", type="string", 2486221Snate@binkert.org help="Name of the message server host\nDEFAULT: localhost") 2492292SN/A parser.add_option("--dist-server-port", 2503867Sbinkertn@umich.edu default=2200, 2516221Snate@binkert.org action="store", type="int", 2522292SN/A help="Message server listen port\nDEFAULT: 2200") 2532292SN/A parser.add_option("--dist-sync-repeat", 2542292SN/A default="0us", 2552292SN/A action="store", type="string", 2562292SN/A help="Repeat interval for synchronisation barriers among dist-gem5 processes\nDEFAULT: --ethernet-linkdelay") 2572292SN/A parser.add_option("--dist-sync-start", 2582292SN/A default="5200000000000t", 2592292SN/A action="store", type="string", 2602292SN/A help="Time to schedule the first dist synchronisation barrier\nDEFAULT:5200000000000t") 2616221Snate@binkert.org parser.add_option("--ethernet-linkspeed", default="10Gbps", 2622292SN/A action="store", type="string", 2632292SN/A help="Link speed in bps\nDEFAULT: 10Gbps") 2642292SN/A parser.add_option("--ethernet-linkdelay", default="10us", 2652292SN/A action="store", type="string", 2662292SN/A help="Link delay in seconds\nDEFAULT: 10us") 2672292SN/A 2682292SN/A # Run duration options 2692292SN/A parser.add_option("-I", "--maxinsts", action="store", type="int", 2706221Snate@binkert.org default=None, help="""Total number of instructions to 2712292SN/A simulate (default: run forever)""") 2722292SN/A parser.add_option("--work-item-id", action="store", type="int", 2732292SN/A help="the specific work id for exit & checkpointing") 2742292SN/A parser.add_option("--num-work-ids", action="store", type="int", 2752292SN/A help="Number of distinct work item types") 2762292SN/A parser.add_option("--work-begin-cpu-id-exit", action="store", type="int", 2772292SN/A help="exit when work starts on the specified cpu") 2782292SN/A parser.add_option("--work-end-exit-count", action="store", type="int", 2796221Snate@binkert.org help="exit at specified work end count") 2802292SN/A parser.add_option("--work-begin-exit-count", action="store", type="int", 2812292SN/A help="exit at specified work begin count") 2822292SN/A parser.add_option("--init-param", action="store", type="int", default=0, 2832292SN/A help="""Parameter available in simulation with m5 2842292SN/A initparam""") 2852292SN/A parser.add_option("--initialize-only", action="store_true", default=False, 2862292SN/A help="""Exit after initialization. Do not simulate time. 2872292SN/A Useful when gem5 is run as a library.""") 2886221Snate@binkert.org 2892292SN/A # Simpoint options 2902292SN/A parser.add_option("--simpoint-profile", action="store_true", 2912292SN/A help="Enable basic block profiling for SimPoints") 2922292SN/A parser.add_option("--simpoint-interval", type="int", default=10000000, 2932292SN/A help="SimPoint interval in num of instructions") 2942292SN/A parser.add_option("--take-simpoint-checkpoints", action="store", type="string", 2952292SN/A help="<simpoint file,weight file,interval-length,warmup-length>") 2962292SN/A parser.add_option("--restore-simpoint-checkpoint", action="store_true", 2976221Snate@binkert.org help="restore from a simpoint checkpoint taken with " + 2986221Snate@binkert.org "--take-simpoint-checkpoints") 2992292SN/A 3003867Sbinkertn@umich.edu # Checkpointing options 3016221Snate@binkert.org ###Note that performing checkpointing via python script files will override 3022292SN/A ###checkpoint instructions built into binaries. 3032292SN/A parser.add_option("--take-checkpoints", action="store", type="string", 3042329SN/A help="<M,N> take checkpoints at tick M and every N ticks thereafter") 3052329SN/A parser.add_option("--max-checkpoints", action="store", type="int", 3062292SN/A help="the maximum number of checkpoints to drop", default=5) 3072292SN/A parser.add_option("--checkpoint-dir", action="store", type="string", 3082292SN/A help="Place all checkpoints in this absolute directory") 3092292SN/A parser.add_option("-r", "--checkpoint-restore", action="store", type="int", 3102292SN/A help="restore from checkpoint <N>") 3112292SN/A parser.add_option("--checkpoint-at-end", action="store_true", 3122292SN/A help="take a checkpoint at end of run") 3132292SN/A parser.add_option("--work-begin-checkpoint-count", action="store", type="int", 3142292SN/A help="checkpoint at specified work begin count") 3152292SN/A parser.add_option("--work-end-checkpoint-count", action="store", type="int", 3162292SN/A help="checkpoint at specified work end count") 3176221Snate@binkert.org parser.add_option("--work-cpus-checkpoint-count", action="store", type="int", 3186221Snate@binkert.org help="checkpoint and exit when active cpu count is reached") 3192292SN/A parser.add_option("--restore-with-cpu", action="store", type="choice", 3203867Sbinkertn@umich.edu default="AtomicSimpleCPU", choices=CpuConfig.cpu_names(), 3216221Snate@binkert.org help = "cpu type for restoring from a checkpoint") 3223867Sbinkertn@umich.edu 3232292SN/A 3242292SN/A # CPU Switching - default switch model goes from a checkpoint 3252292SN/A # to a timing simple CPU with caches to warm up, then to detailed CPU for 3262292SN/A # data measurement 3272292SN/A parser.add_option("--repeat-switch", action="store", type="int", 3282292SN/A default=None, 3292292SN/A help="switch back and forth between CPUs with period <N>") 3308707Sandreas.hansson@arm.com parser.add_option("-s", "--standard-switch", action="store", type="int", 3318707Sandreas.hansson@arm.com default=None, 3328707Sandreas.hansson@arm.com help="switch from timing to Detailed CPU after warmup period of <N>") 3338707Sandreas.hansson@arm.com parser.add_option("-p", "--prog-interval", type="str", 3348707Sandreas.hansson@arm.com help="CPU Progress Interval") 3358707Sandreas.hansson@arm.com 3368707Sandreas.hansson@arm.com # Fastforwarding and simpoint related materials 3378707Sandreas.hansson@arm.com parser.add_option("-W", "--warmup-insts", action="store", type="int", 3388707Sandreas.hansson@arm.com default=None, 3398707Sandreas.hansson@arm.com help="Warmup period in total instructions (requires --standard-switch)") 3408707Sandreas.hansson@arm.com parser.add_option("--bench", action="store", type="string", default=None, 3418707Sandreas.hansson@arm.com help="base names for --take-checkpoint and --checkpoint-restore") 3428707Sandreas.hansson@arm.com parser.add_option("-F", "--fast-forward", action="store", type="string", 3438707Sandreas.hansson@arm.com default=None, 3448707Sandreas.hansson@arm.com help="Number of instructions to fast forward before switching") 3458707Sandreas.hansson@arm.com parser.add_option("-S", "--simpoint", action="store_true", default=False, 3468707Sandreas.hansson@arm.com help="""Use workload simpoints as an instruction offset for 3478707Sandreas.hansson@arm.com --checkpoint-restore or --take-checkpoint.""") 3488975Sandreas.hansson@arm.com parser.add_option("--at-instruction", action="store_true", default=False, 3498707Sandreas.hansson@arm.com help="""Treat value of --checkpoint-restore or --take-checkpoint as a 3508707Sandreas.hansson@arm.com number of instructions.""") 3518707Sandreas.hansson@arm.com parser.add_option("--spec-input", default="ref", type="choice", 3528707Sandreas.hansson@arm.com choices=["ref", "test", "train", "smred", "mdred", 3538948Sandreas.hansson@arm.com "lgred"], 3548948Sandreas.hansson@arm.com help="Input set size for SPEC CPU2000 benchmarks.") 3558948Sandreas.hansson@arm.com parser.add_option("--arm-iset", default="arm", type="choice", 3568707Sandreas.hansson@arm.com choices=["arm", "thumb", "aarch64"], 3578948Sandreas.hansson@arm.com help="ARM instruction set.") 3588975Sandreas.hansson@arm.com 3598975Sandreas.hansson@arm.com 3608948Sandreas.hansson@arm.comdef addSEOptions(parser): 3618948Sandreas.hansson@arm.com # Benchmark options 3628948Sandreas.hansson@arm.com parser.add_option("-c", "--cmd", default="", 3638948Sandreas.hansson@arm.com help="The binary to run in syscall emulation mode.") 3648948Sandreas.hansson@arm.com parser.add_option("-o", "--options", default="", 3658948Sandreas.hansson@arm.com help="""The options to pass to the binary, use " " 3668948Sandreas.hansson@arm.com around the entire string""") 3678948Sandreas.hansson@arm.com parser.add_option("-e", "--env", default="", 3688948Sandreas.hansson@arm.com help="Initialize workload environment from text file.") 3698948Sandreas.hansson@arm.com parser.add_option("-i", "--input", default="", 3708707Sandreas.hansson@arm.com help="Read stdin from a file.") 3718707Sandreas.hansson@arm.com parser.add_option("--output", default="", 3728707Sandreas.hansson@arm.com help="Redirect stdout to a file.") 3738707Sandreas.hansson@arm.com parser.add_option("--errout", default="", 3742292SN/A help="Redirect stderr to a file.") 3752292SN/A parser.add_option("--chroot", action="store", type="string", default="/", 3762292SN/A help="The chroot option allows a user to alter the " \ 3772292SN/A "search path for processes running in SE mode. " \ 3782292SN/A "Normally, the search path would begin at the " \ 3792292SN/A "root of the filesystem (i.e. /). With chroot, " \ 3806221Snate@binkert.org "a user can force the process to begin looking at" \ 3816221Snate@binkert.org "some other location (i.e. /home/user/rand_dir)." \ 3822292SN/A "The intended use is to trick sophisticated " \ 3833867Sbinkertn@umich.edu "software which queries the __HOST__ filesystem " \ 3846221Snate@binkert.org "for information or functionality. Instead of " \ 3853867Sbinkertn@umich.edu "finding files on the __HOST__ filesystem, the " \ 3862292SN/A "process will find the user's replacment files.") 3872292SN/A 3882292SN/A 3892292SN/Adef addFSOptions(parser): 3902292SN/A from .FSConfig import os_types 3912292SN/A 3922292SN/A # Simulation options 3932292SN/A parser.add_option("--timesync", action="store_true", 3942292SN/A help="Prevent simulated time from getting ahead of real time") 3952292SN/A 3962292SN/A # System options 3972292SN/A parser.add_option("--kernel", action="store", type="string") 3986221Snate@binkert.org parser.add_option("--os-type", action="store", type="choice", 3996221Snate@binkert.org choices=os_types[str(buildEnv['TARGET_ISA'])], 4002292SN/A default="linux", 4013867Sbinkertn@umich.edu help="Specifies type of OS to boot") 4026221Snate@binkert.org parser.add_option("--script", action="store", type="string") 4033867Sbinkertn@umich.edu parser.add_option("--frame-capture", action="store_true", 4042292SN/A help="Stores changed frame buffers from the VNC server to compressed "\ 4052292SN/A "files in the gem5 output directory") 4062292SN/A 4072292SN/A if buildEnv['TARGET_ISA'] == "arm": 4082292SN/A parser.add_option("--bare-metal", action="store_true", 4092292SN/A help="Provide the raw system without the linux specific bits") 4102292SN/A parser.add_option("--list-machine-types", 4112292SN/A action="callback", callback=_listPlatformTypes, 4122292SN/A help="List available platform types") 4132292SN/A parser.add_option("--machine-type", action="store", type="choice", 4142292SN/A choices=PlatformConfig.platform_names(), 4152292SN/A default="VExpress_EMM") 4166221Snate@binkert.org parser.add_option("--dtb-filename", action="store", type="string", 4176221Snate@binkert.org help="Specifies device tree blob file to use with device-tree-"\ 4182292SN/A "enabled kernels") 4193867Sbinkertn@umich.edu parser.add_option("--enable-security-extensions", action="store_true", 4206221Snate@binkert.org help="Turn on the ARM Security Extensions") 4213867Sbinkertn@umich.edu parser.add_option("--enable-context-switch-stats-dump", \ 4222292SN/A action="store_true", help="Enable stats dump at context "\ 4232292SN/A "switches and dump tasks file (required for Streamline)") 4242292SN/A 4252292SN/A # Benchmark options 4262292SN/A parser.add_option("--dual", action="store_true", 4272292SN/A help="Simulate two systems attached with an ethernet link") 4282292SN/A parser.add_option("-b", "--benchmark", action="store", type="string", 4292292SN/A dest="benchmark", 4302292SN/A help="Specify the benchmark to run. Available benchmarks: %s"\ 4312292SN/A % DefinedBenchmarks) 4322292SN/A 4332292SN/A # Metafile options 4346221Snate@binkert.org parser.add_option("--etherdump", action="store", type="string", dest="etherdump", 4356221Snate@binkert.org help="Specify the filename to dump a pcap capture of the" \ 4362292SN/A "ethernet traffic") 4373867Sbinkertn@umich.edu 4386221Snate@binkert.org # Disk Image Options 4393867Sbinkertn@umich.edu parser.add_option("--disk-image", action="store", type="string", default=None, 4402292SN/A help="Path to the disk image to use.") 4412292SN/A parser.add_option("--root-device", action="store", type="string", default=None, 4422292SN/A help="OS device name for root partition") 4432292SN/A 4442292SN/A # Command line options 4452292SN/A parser.add_option("--command-line", action="store", type="string", 4462292SN/A default=None, 4472292SN/A help="Template for the kernel command line.") 4486221Snate@binkert.org parser.add_option("--command-line-file", action="store", 4492292SN/A default=None, type="string", 4503870Sbinkertn@umich.edu help="File with a template for the kernel command line") 4512292SN/A