def addTHNVMOptions(parser): parser.add_option("--dram-type", type="choice", default="DDR3_1600_x64", choices=MemConfig.mem_names(), help = "type of DRAM to use") parser.add_option("--nvm-type", type="choice", default="DDR3_1600_x64_PCM", choices=MemConfig.mem_names(), help = "type of NVM to use") parser.add_option("--block-bits", type="int", default=6, help="number of bits of a block in the block remapping scheme") parser.add_option("--page-bits", type="int", default=12, help="number of bits of a page in the page writeback scheme") parser.add_option("--btt-length", type="int", default=0, help="number of BTT entries") parser.add_option("--ptt-length", type="int", default=0, help="number of PTT entries")
def addFSOptions(parser): # Simulation options parser.add_option( "--timesync", action="store_true", help="Prevent simulated time from getting ahead of real time") # JIWON: pim options parser.add_option("--num-pim-sys", type="int", default=0) parser.add_option("--pim-mem-type", type="choice", default="HMCVault", choices=MemConfig.mem_names()) # System options parser.add_option("--kernel", action="store", type="string") parser.add_option("--script", action="store", type="string") parser.add_option("--frame-capture", action="store_true", help="Stores changed frame buffers from the VNC server to compressed "\ "files in the gem5 output directory") if buildEnv['TARGET_ISA'] == "arm": parser.add_option( "--bare-metal", action="store_true", help="Provide the raw system without the linux specific bits") parser.add_option("--machine-type", action="store", type="choice", choices=ArmMachineType.map.keys(), default="VExpress_EMM") parser.add_option("--dtb-filename", action="store", type="string", help="Specifies device tree blob file to use with device-tree-"\ "enabled kernels") parser.add_option("--enable-context-switch-stats-dump", \ action="store_true", help="Enable stats dump at context "\ "switches and dump tasks file (required for Streamline)") # Benchmark options parser.add_option( "--dual", action="store_true", help="Simulate two systems attached with an ethernet link") parser.add_option("-b", "--benchmark", action="store", type="string", dest="benchmark", help="Specify the benchmark to run. Available benchmarks: %s"\ % DefinedBenchmarks) # Metafile options parser.add_option("--etherdump", action="store", type="string", dest="etherdump", help="Specify the filename to dump a pcap capture of the" \ "ethernet traffic") # Disk Image Options parser.add_option("--disk-image", action="store", type="string", default=None, help="Path to the disk image to use.")
def addCommonOptions(parser): # system options parser.add_option("--list-cpu-types", action="callback", callback=_listCpuTypes, help="List available CPU types") parser.add_option("--cpu-type", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help="type of cpu to run with") parser.add_option("--checker", action="store_true") parser.add_option("-n", "--num-cpus", type="int", default=1) parser.add_option("--sys-voltage", action="store", type="string", default='1.0V', help="""Top-level voltage for blocks running at system power supply""") parser.add_option("--sys-clock", action="store", type="string", default='1GHz', help="""Top-level clock for blocks running at system speed""") parser.add_option("--cpu-clock", action="store", type="string", default='2GHz', help="Clock for blocks running at CPU speed") parser.add_option("--smt", action="store_true", default=False, help=""" Only used if multiple programs are specified. If true, then the number of threads per cpu is same as the number of programs.""") # Memory Options parser.add_option("--list-mem-types", action="callback", callback=_listMemTypes, help="List available memory types") parser.add_option("--mem-type", type="choice", default="ddr3_1600_x64", choices=MemConfig.mem_names(), help="type of memory to use") parser.add_option("--mem-channels", type="int", default=1, help="number of memory channels") parser.add_option("--mem-numbers", type="int", default=1, help="number of memorys") parser.add_option("--memsize-list", type="string", default="default", help="set size for each memory by a list") #### fixme parser.add_option("--is-pcm", type="string", default="default", help="set is_pcm for each memory by a list") #### fixme # parser.add_option("--pcm-numb", type="int", default=0, # help = "number of pcm") parser.add_option( "--mem-size", action="store", type="string", help="Specify the physical memory size at one time") #### fixme parser.add_option("-l", "--lpae", action="store_true") parser.add_option("-V", "--virtualisation", action="store_true") parser.add_option("-P", "--pcm", action="store_true", help="Using PCM") # Cache Options parser.add_option("--caches", action="store_true") parser.add_option("--l2cache", action="store_true") parser.add_option("--fastmem", action="store_true") parser.add_option("--num-dirs", type="int", default=1) parser.add_option("--num-l2caches", type="int", default=1) parser.add_option("--num-l3caches", type="int", default=1) parser.add_option("--l1d_size", type="string", default="64kB") parser.add_option("--l1i_size", type="string", default="32kB") parser.add_option("--l2_size", type="string", default="2MB") parser.add_option("--l3_size", type="string", default="16MB") parser.add_option("--l1d_assoc", type="int", default=2) parser.add_option("--l1i_assoc", type="int", default=2) parser.add_option("--l2_assoc", type="int", default=8) parser.add_option("--l3_assoc", type="int", default=16) parser.add_option("--cacheline_size", type="int", default=64) # Enable Ruby parser.add_option("--ruby", action="store_true") # Run duration options parser.add_option("-m", "--abs-max-tick", type="int", default=m5.MaxTick, metavar="TICKS", help="Run to absolute simulated tick " \ "specified including ticks from a restored checkpoint") parser.add_option("--rel-max-tick", type="int", default=None, metavar="TICKS", help="Simulate for specified number of" \ " ticks relative to the simulation start tick (e.g. if " \ "restoring a checkpoint)") parser.add_option("--maxtime", type="float", default=None, help="Run to the specified absolute simulated time in " \ "seconds") parser.add_option("-I", "--maxinsts", action="store", type="int", default=None, help="""Total number of instructions to simulate (default: run forever)""") parser.add_option("--work-item-id", action="store", type="int", help="the specific work id for exit & checkpointing") parser.add_option("--num-work-ids", action="store", type="int", help="Number of distinct work item types") parser.add_option("--work-begin-cpu-id-exit", action="store", type="int", help="exit when work starts on the specified cpu") parser.add_option("--work-end-exit-count", action="store", type="int", help="exit at specified work end count") parser.add_option("--work-begin-exit-count", action="store", type="int", help="exit at specified work begin count") parser.add_option("--init-param", action="store", type="int", default=0, help="""Parameter available in simulation with m5 initparam""") # Simpoint options parser.add_option("--simpoint-profile", action="store_true", help="Enable basic block profiling for SimPoints") parser.add_option("--simpoint-interval", type="int", default=10000000, help="SimPoint interval in num of instructions") # Checkpointing options ###Note that performing checkpointing via python script files will override ###checkpoint instructions built into binaries. parser.add_option( "--take-checkpoints", action="store", type="string", help="<M,N> take checkpoints at tick M and every N ticks thereafter") parser.add_option("--max-checkpoints", action="store", type="int", help="the maximum number of checkpoints to drop", default=5) parser.add_option("--checkpoint-dir", action="store", type="string", help="Place all checkpoints in this absolute directory") parser.add_option("-r", "--checkpoint-restore", action="store", type="int", help="restore from checkpoint <N>") parser.add_option("--checkpoint-at-end", action="store_true", help="take a checkpoint at end of run") parser.add_option("--work-begin-checkpoint-count", action="store", type="int", help="checkpoint at specified work begin count") parser.add_option("--work-end-checkpoint-count", action="store", type="int", help="checkpoint at specified work end count") parser.add_option( "--work-cpus-checkpoint-count", action="store", type="int", help="checkpoint and exit when active cpu count is reached") parser.add_option("--restore-with-cpu", action="store", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help="cpu type for restoring from a checkpoint") # CPU Switching - default switch model goes from a checkpoint # to a timing simple CPU with caches to warm up, then to detailed CPU for # data measurement parser.add_option( "--repeat-switch", action="store", type="int", default=None, help="switch back and forth between CPUs with period <N>") parser.add_option( "-s", "--standard-switch", action="store", type="int", default=None, help="switch from timing to Detailed CPU after warmup period of <N>") parser.add_option("-p", "--prog-interval", type="str", help="CPU Progress Interval") # Fastforwarding and simpoint related materials parser.add_option( "-W", "--warmup-insts", action="store", type="int", default=None, help="Warmup period in total instructions (requires --standard-switch)" ) parser.add_option( "--bench", action="store", type="string", default=None, help="base names for --take-checkpoint and --checkpoint-restore") parser.add_option( "-F", "--fast-forward", action="store", type="string", default=None, help="Number of instructions to fast forward before switching") parser.add_option( "-S", "--simpoint", action="store_true", default=False, help="""Use workload simpoints as an instruction offset for --checkpoint-restore or --take-checkpoint.""") parser.add_option( "--at-instruction", action="store_true", default=False, help="""Treat value of --checkpoint-restore or --take-checkpoint as a number of instructions.""") parser.add_option( "--spec-input", default="ref", type="choice", choices=["ref", "test", "train", "smred", "mdred", "lgred"], help="Input set size for SPEC CPU2000 benchmarks.") parser.add_option("--arm-iset", default="arm", type="choice", choices=["arm", "thumb", "aarch64"], help="ARM instruction set.")
from m5.internal.stats import periodicStatDump addToPath('../common') import MemConfig # this script is helpful to sweep the efficiency of a specific memory # controller configuration, by varying the number of banks accessed, # and the sequential stride size (how many bytes per activate), and # observe what bus utilisation (bandwidth) is achieved parser = optparse.OptionParser() # Use a single-channel DDR3-1600 x64 by default parser.add_option("--mem-type", type="choice", default="ddr3_1600_x64", choices=MemConfig.mem_names(), help = "type of memory to use") parser.add_option("--ranks", "-r", type="int", default=1, help = "Number of ranks to iterate across") parser.add_option("--rd_perc", type="int", default=100, help = "Percentage of read commands") parser.add_option("--mode", type="choice", default="DRAM", choices=["DRAM", "DRAM_ROTATE"], help = "DRAM: Random traffic; \ DRAM_ROTATE: Traffic rotating across banks and ranks") parser.add_option("--addr_map", type="int", default=1, help = "0: RoCoRaBaCh; 1: RoRaBaCoCh/RoRaBaChCo")
def addCommonOptions(parser): # system options parser.add_option("--extra", type="int", default=0) parser.add_option("--instructionQueue-instruction-flag", type="int", default=0) parser.add_option("--instructionQueue-instruction-faultType", type="int", default=0) parser.add_option("--instructionQueue-instruction-faultRate", type="float", default=0.0) parser.add_option("--reorderBuffer-instruction-flag", type="int", default=0) parser.add_option("--reorderBuffer-instruction-faultType", type="int", default=0) parser.add_option("--reorderBuffer-instruction-faultRate", type="float", default=0.0) parser.add_option("--register-integer-flag", type="int", default=0) parser.add_option("--register-integer-faultType", type="int", default=0) parser.add_option("--register-integer-faultRate", type="float", default=0.0) parser.add_option("--register-floatingPoint-flag", type="int", default=0) parser.add_option("--register-floatingPoint-faultType", type="int", default=0) parser.add_option("--register-floatingPoint-faultRate", type="float", default=0.0) parser.add_option("--cache-tag-flag", type="int", default=0) parser.add_option("--cache-tag-faultType", type="int", default=0) parser.add_option("--cache-tag-faultRate", type="float", default=0.0) parser.add_option("--cache-state-flag", type="int", default=0) parser.add_option("--cache-state-faultType", type="int", default=0) parser.add_option("--cache-state-faultRate", type="float", default=0.0) parser.add_option("--cache-data-flag", type="int", default=0) parser.add_option("--cache-data-faultType", type="int", default=0) parser.add_option("--cache-data-faultRate", type="float", default=0.0) parser.add_option("--tlb-tag-flag", type="int", default=0) parser.add_option("--tlb-tag-faultType", type="int", default=0) parser.add_option("--tlb-tag-faultRate", type="float", default=0.0) parser.add_option("--tlb-state-flag", type="int", default=0) parser.add_option("--tlb-state-faultType", type="int", default=0) parser.add_option("--tlb-state-faultRate", type="float", default=0.0) parser.add_option("--tlb-data-flag", type="int", default=0) parser.add_option("--tlb-data-faultType", type="int", default=0) parser.add_option("--tlb-data-faultRate", type="float", default=0.0) parser.add_option("--encodingType", type="choice", default="none", choices=[ 'hamming', 'berger', 'cyclic', 'single_check', 'double_check', 'none' ]) parser.add_option("--encodingHidden", type="int", default=0) parser.add_option("--list-cpu-types", action="callback", callback=_listCpuTypes, help="List available CPU types") parser.add_option("--test-Flag", type="int", default=0) parser.add_option("--cpu-type", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help="type of cpu to run with") parser.add_option("--checker", action="store_true") parser.add_option("-n", "--num-cpus", type="int", default=1) parser.add_option("--sys-voltage", action="store", type="string", default='1.0V', help="""Top-level voltage for blocks running at system power supply""") parser.add_option("--sys-clock", action="store", type="string", default='1GHz', help="""Top-level clock for blocks running at system speed""") parser.add_option("--cpu-clock", action="store", type="string", default='2GHz', help="Clock for blocks running at CPU speed") parser.add_option("--smt", action="store_true", default=False, help=""" Only used if multiple programs are specified. If true, then the number of threads per cpu is same as the number of programs.""") parser.add_option("--elastic-trace-en", action="store_true", help="""Enable capture of data dependency and instruction fetch traces using elastic trace probe.""") # Trace file paths input to trace probe in a capture simulation and input # to Trace CPU in a replay simulation parser.add_option("--inst-trace-file", action="store", type="string", help="""Instruction fetch trace file input to Elastic Trace probe in a capture simulation and Trace CPU in a replay simulation""", default="") parser.add_option("--data-trace-file", action="store", type="string", help="""Data dependency trace file input to Elastic Trace probe in a capture simulation and Trace CPU in a replay simulation""", default="") # Memory Options parser.add_option("--list-mem-types", action="callback", callback=_listMemTypes, help="List available memory types") parser.add_option("--mem-type", type="choice", default="DDR3_1600_x64", choices=MemConfig.mem_names(), help="type of memory to use") parser.add_option("--mem-channels", type="int", default=1, help="number of memory channels") parser.add_option("--mem-ranks", type="int", default=None, help="number of memory ranks per channel") parser.add_option("--mem-size", action="store", type="string", default="512MB", help="Specify the physical memory size (single memory)") parser.add_option("-l", "--lpae", action="store_true") parser.add_option("-V", "--virtualisation", action="store_true") parser.add_option("--memchecker", action="store_true") # Cache Options parser.add_option("--external-memory-system", type="string", help="use external ports of this port_type for caches") parser.add_option("--tlm-memory", type="string", help="use external port for SystemC TLM cosimulation") parser.add_option("--caches", action="store_true") parser.add_option("--l2cache", action="store_true") parser.add_option("--fastmem", action="store_true") parser.add_option("--num-dirs", type="int", default=1) parser.add_option("--num-l2caches", type="int", default=1) parser.add_option("--num-l3caches", type="int", default=1) parser.add_option("--l1d_size", type="string", default="64kB") parser.add_option("--l1i_size", type="string", default="32kB") parser.add_option("--l2_size", type="string", default="2MB") parser.add_option("--l3_size", type="string", default="16MB") parser.add_option("--l1d_assoc", type="int", default=2) parser.add_option("--l1i_assoc", type="int", default=2) parser.add_option("--l2_assoc", type="int", default=8) parser.add_option("--l3_assoc", type="int", default=16) parser.add_option("--cacheline_size", type="int", default=64) # dist-gem5 options parser.add_option("--dist", action="store_true", help="Parallel distributed gem5 simulation.") parser.add_option("--is-switch", action="store_true", help="Select the network switch simulator process for a"\ "distributed gem5 run") parser.add_option("--dist-rank", default=0, action="store", type="int", help="Rank of this system within the dist gem5 run.") parser.add_option( "--dist-size", default=0, action="store", type="int", help="Number of gem5 processes within the dist gem5 run.") parser.add_option( "--dist-server-name", default="127.0.0.1", action="store", type="string", help="Name of the message server host\nDEFAULT: localhost") parser.add_option("--dist-server-port", default=2200, action="store", type="int", help="Message server listen port\nDEFAULT: 2200") parser.add_option( "--dist-sync-repeat", default="0us", action="store", type="string", help= "Repeat interval for synchronisation barriers among dist-gem5 processes\nDEFAULT: --ethernet-linkdelay" ) parser.add_option( "--dist-sync-start", default="5200000000000t", action="store", type="string", help= "Time to schedule the first dist synchronisation barrier\nDEFAULT:5200000000000t" ) parser.add_option("--ethernet-linkspeed", default="10Gbps", action="store", type="string", help="Link speed in bps\nDEFAULT: 10Gbps") parser.add_option("--ethernet-linkdelay", default="10us", action="store", type="string", help="Link delay in seconds\nDEFAULT: 10us") # Enable Ruby parser.add_option("--ruby", action="store_true") # Run duration options parser.add_option("-m", "--abs-max-tick", type="int", default=m5.MaxTick, metavar="TICKS", help="Run to absolute simulated tick " \ "specified including ticks from a restored checkpoint") parser.add_option("--rel-max-tick", type="int", default=None, metavar="TICKS", help="Simulate for specified number of" \ " ticks relative to the simulation start tick (e.g. if " \ "restoring a checkpoint)") parser.add_option("--maxtime", type="float", default=None, help="Run to the specified absolute simulated time in " \ "seconds") parser.add_option("-I", "--maxinsts", action="store", type="int", default=None, help="""Total number of instructions to simulate (default: run forever)""") parser.add_option("--work-item-id", action="store", type="int", help="the specific work id for exit & checkpointing") parser.add_option("--num-work-ids", action="store", type="int", help="Number of distinct work item types") parser.add_option("--work-begin-cpu-id-exit", action="store", type="int", help="exit when work starts on the specified cpu") parser.add_option("--work-end-exit-count", action="store", type="int", help="exit at specified work end count") parser.add_option("--work-begin-exit-count", action="store", type="int", help="exit at specified work begin count") parser.add_option("--init-param", action="store", type="int", default=0, help="""Parameter available in simulation with m5 initparam""") parser.add_option("--initialize-only", action="store_true", default=False, help="""Exit after initialization. Do not simulate time. Useful when gem5 is run as a library.""") # Simpoint options parser.add_option("--simpoint-profile", action="store_true", help="Enable basic block profiling for SimPoints") parser.add_option("--simpoint-interval", type="int", default=10000000, help="SimPoint interval in num of instructions") parser.add_option( "--take-simpoint-checkpoints", action="store", type="string", help="<simpoint file,weight file,interval-length,warmup-length>") parser.add_option("--restore-simpoint-checkpoint", action="store_true", help="restore from a simpoint checkpoint taken with " + "--take-simpoint-checkpoints") # Checkpointing options ###Note that performing checkpointing via python script files will override ###checkpoint instructions built into binaries. parser.add_option( "--take-checkpoints", action="store", type="string", help="<M,N> take checkpoints at tick M and every N ticks thereafter") parser.add_option("--max-checkpoints", action="store", type="int", help="the maximum number of checkpoints to drop", default=5) parser.add_option("--checkpoint-dir", action="store", type="string", help="Place all checkpoints in this absolute directory") parser.add_option("-r", "--checkpoint-restore", action="store", type="int", help="restore from checkpoint <N>") parser.add_option("--checkpoint-at-end", action="store_true", help="take a checkpoint at end of run") parser.add_option("--work-begin-checkpoint-count", action="store", type="int", help="checkpoint at specified work begin count") parser.add_option("--work-end-checkpoint-count", action="store", type="int", help="checkpoint at specified work end count") parser.add_option( "--work-cpus-checkpoint-count", action="store", type="int", help="checkpoint and exit when active cpu count is reached") parser.add_option("--restore-with-cpu", action="store", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help="cpu type for restoring from a checkpoint") # CPU Switching - default switch model goes from a checkpoint # to a timing simple CPU with caches to warm up, then to detailed CPU for # data measurement parser.add_option( "--repeat-switch", action="store", type="int", default=None, help="switch back and forth between CPUs with period <N>") parser.add_option( "-s", "--standard-switch", action="store", type="int", default=None, help="switch from timing to Detailed CPU after warmup period of <N>") parser.add_option("-p", "--prog-interval", type="str", help="CPU Progress Interval") # Fastforwarding and simpoint related materials parser.add_option( "-W", "--warmup-insts", action="store", type="int", default=None, help="Warmup period in total instructions (requires --standard-switch)" ) parser.add_option( "--bench", action="store", type="string", default=None, help="base names for --take-checkpoint and --checkpoint-restore") parser.add_option( "-F", "--fast-forward", action="store", type="string", default=None, help="Number of instructions to fast forward before switching") parser.add_option( "-S", "--simpoint", action="store_true", default=False, help="""Use workload simpoints as an instruction offset for --checkpoint-restore or --take-checkpoint.""") parser.add_option( "--at-instruction", action="store_true", default=False, help="""Treat value of --checkpoint-restore or --take-checkpoint as a number of instructions.""") parser.add_option( "--spec-input", default="ref", type="choice", choices=["ref", "test", "train", "smred", "mdred", "lgred"], help="Input set size for SPEC CPU2000 benchmarks.") parser.add_option("--arm-iset", default="arm", type="choice", choices=["arm", "thumb", "aarch64"], help="ARM instruction set.")
def addCommonOptions(parser): # system options parser.add_option("--list-cpu-types", action="callback", callback=_listCpuTypes, help="List available CPU types") parser.add_option("--cpu-type", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help = "type of cpu to run with") parser.add_option("--checker", action="store_true"); parser.add_option("-n", "--num-cpus", type="int", default=1) parser.add_option("--sys-clock", action="store", type="string", default='1GHz', help = """Top-level clock for blocks running at system speed""") parser.add_option("--cpu-clock", action="store", type="string", default='2GHz', help="Clock for blocks running at CPU speed") parser.add_option("--smt", action="store_true", default=False, help = """ Only used if multiple programs are specified. If true, then the number of threads per cpu is same as the number of programs.""") # Memory Options parser.add_option("--list-mem-types", action="callback", callback=_listMemTypes, help="List available memory types") parser.add_option("--mem-type", type="choice", default="simple_mem", choices=MemConfig.mem_names(), help = "type of memory to use") parser.add_option("--mem-size", action="store", type="string", default="512MB", help="Specify the physical memory size (single memory)") #synthesis parser.add_option("--syscall-dump", action="store_true", help="Dump the syscall.") parser.add_option("--synthesize", action="store_true", help="Generate synthesis code for a benchmark/interval.") parser.add_option("--synthesize-start", type="int", default=1, help="synthesis start instruction") parser.add_option("--synthesize-interval", type="int", default=10000000, help="synthesis window size") # Cache Options parser.add_option("--caches", action="store_true") parser.add_option("--l2cache", action="store_true") parser.add_option("--fastmem", action="store_true") parser.add_option("--num-dirs", type="int", default=1) parser.add_option("--num-l2caches", type="int", default=1) parser.add_option("--num-l3caches", type="int", default=1) parser.add_option("--l1d_size", type="string", default="64kB") parser.add_option("--l1i_size", type="string", default="32kB") parser.add_option("--l2_size", type="string", default="2MB") parser.add_option("--l3_size", type="string", default="16MB") parser.add_option("--l1d_assoc", type="int", default=2) parser.add_option("--l1i_assoc", type="int", default=2) parser.add_option("--l2_assoc", type="int", default=8) parser.add_option("--l3_assoc", type="int", default=16) parser.add_option("--cacheline_size", type="int", default=64) # Enable Ruby parser.add_option("--ruby", action="store_true") # Run duration options parser.add_option("-m", "--abs-max-tick", type="int", default=None, metavar="TICKS", help="Run to absolute simulated tick " \ "specified including ticks from a restored checkpoint") parser.add_option("--rel-max-tick", type="int", default=None, metavar="TICKS", help="Simulate for specified number of" \ " ticks relative to the simulation start tick (e.g. if " \ "restoring a checkpoint)") parser.add_option("--maxtime", type="float", default=None, help="Run to the specified absolute simulated time in " \ "seconds") parser.add_option("-I", "--maxinsts", action="store", type="int", default=None, help="""Total number of instructions to simulate (default: run forever)""") parser.add_option("--work-item-id", action="store", type="int", help="the specific work id for exit & checkpointing") parser.add_option("--work-begin-cpu-id-exit", action="store", type="int", help="exit when work starts on the specified cpu") parser.add_option("--work-end-exit-count", action="store", type="int", help="exit at specified work end count") parser.add_option("--work-begin-exit-count", action="store", type="int", help="exit at specified work begin count") parser.add_option("--init-param", action="store", type="int", default=0, help="""Parameter available in simulation with m5 initparam""") # Simpoint options parser.add_option("--simpoint-profile", action="store_true", help="Enable basic block profiling for SimPoints") parser.add_option("--simpoint-interval", type="int", default=10000000, help="SimPoint interval in num of instructions") # Checkpointing options ###Note that performing checkpointing via python script files will override ###checkpoint instructions built into binaries. parser.add_option("--take-checkpoints", action="store", type="string", help="<M,N> take checkpoints at tick M and every N ticks thereafter") parser.add_option("--max-checkpoints", action="store", type="int", help="the maximum number of checkpoints to drop", default=5) parser.add_option("--checkpoint-dir", action="store", type="string", help="Place all checkpoints in this absolute directory") parser.add_option("-r", "--checkpoint-restore", action="store", type="int", help="restore from checkpoint <N>") parser.add_option("--checkpoint-at-end", action="store_true", help="take a checkpoint at end of run") parser.add_option("--work-begin-checkpoint-count", action="store", type="int", help="checkpoint at specified work begin count") parser.add_option("--work-end-checkpoint-count", action="store", type="int", help="checkpoint at specified work end count") parser.add_option("--work-cpus-checkpoint-count", action="store", type="int", help="checkpoint and exit when active cpu count is reached") parser.add_option("--restore-with-cpu", action="store", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help = "cpu type for restoring from a checkpoint") # CPU Switching - default switch model goes from a checkpoint # to a timing simple CPU with caches to warm up, then to detailed CPU for # data measurement parser.add_option("--repeat-switch", action="store", type="int", default=None, help="switch back and forth between CPUs with period <N>") parser.add_option("-s", "--standard-switch", action="store", type="int", default=None, help="switch from timing to Detailed CPU after warmup period of <N>") parser.add_option("-p", "--prog-interval", type="str", help="CPU Progress Interval") # Fastforwarding and simpoint related materials parser.add_option("-W", "--warmup-insts", action="store", type="int", default=None, help="Warmup period in total instructions (requires --standard-switch)") parser.add_option("--bench", action="store", type="string", default=None, help="base names for --take-checkpoint and --checkpoint-restore") parser.add_option("-F", "--fast-forward", action="store", type="string", default=None, help="Number of instructions to fast forward before switching") parser.add_option("-S", "--simpoint", action="store_true", default=False, help="""Use workload simpoints as an instruction offset for --checkpoint-restore or --take-checkpoint.""") parser.add_option("--at-instruction", action="store_true", default=False, help="""Treat value of --checkpoint-restore or --take-checkpoint as a number of instructions.""")
def addNoISAOptions(parser): parser.add_option("-n", "--num-cpus", type="int", default=1) parser.add_option("--sys-voltage", action="store", type="string", default='1.0V', help = """Top-level voltage for blocks running at system power supply""") parser.add_option("--sys-clock", action="store", type="string", default='1GHz', help = """Top-level clock for blocks running at system speed""") # Memory Options parser.add_option("--list-mem-types", action="callback", callback=_listMemTypes, help="List available memory types") parser.add_option("--mem-type", type="choice", default="DDR3_1600_x64", choices=MemConfig.mem_names(), help = "type of memory to use") parser.add_option("--mem-channels", type="int", default=1, help = "number of memory channels") parser.add_option("--mem-ranks", type="int", default=None, help = "number of memory ranks per channel") parser.add_option("--mem-size", action="store", type="string", default="512MB", help="Specify the physical memory size (single memory)") parser.add_option("--memchecker", action="store_true") # Cache Options parser.add_option("--external-memory-system", type="string", help="use external ports of this port_type for caches") parser.add_option("--tlm-memory", type="string", help="use external port for SystemC TLM cosimulation") parser.add_option("--caches", action="store_true") parser.add_option("--l2cache", action="store_true") parser.add_option("--num-dirs", type="int", default=1) parser.add_option("--num-l2caches", type="int", default=1) parser.add_option("--num-l3caches", type="int", default=1) parser.add_option("--l1d_size", type="string", default="64kB") parser.add_option("--l1i_size", type="string", default="32kB") parser.add_option("--l2_size", type="string", default="2MB") parser.add_option("--l3_size", type="string", default="16MB") parser.add_option("--l1d_assoc", type="int", default=2) parser.add_option("--l1i_assoc", type="int", default=2) parser.add_option("--l2_assoc", type="int", default=8) parser.add_option("--l3_assoc", type="int", default=16) parser.add_option("--cacheline_size", type="int", default=64) # Enable Ruby parser.add_option("--ruby", action="store_true") # Run duration options parser.add_option("-m", "--abs-max-tick", type="int", default=m5.MaxTick, metavar="TICKS", help="Run to absolute simulated tick " "specified including ticks from a restored checkpoint") parser.add_option("--rel-max-tick", type="int", default=None, metavar="TICKS", help="Simulate for specified number of" " ticks relative to the simulation start tick (e.g. if " "restoring a checkpoint)") parser.add_option("--maxtime", type="float", default=None, help="Run to the specified absolute simulated time in " "seconds")
def addCommonOptions(parser): # system options parser.add_option("--list-cpu-types", action="callback", callback=_listCpuTypes, help="List available CPU types") parser.add_option("--cpu-type", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help="type of cpu to run with") parser.add_option("--cpus-types", action="store", type="string", default="atomic") parser.add_option("--checker", action="store_true") parser.add_option( "--num-cpus-types", action="store", type="int", help= "If != 1, then all CPU related types must be specified. Each CPU type will have at least one diferent L2 cache" ) parser.add_option("--num-cpus-eachtype", action="store", type="string", default="1") #, nargs='+') parser.add_option("--cpus-type-names", action="store", type="string", default="big") #, nargs='+') parser.add_option("--sys-voltage", action="store", type="string", default='1.0V', help="""Top-level voltage for blocks running at system power supply""") parser.add_option("--sys-clock", action="store", type="string", default='1GHz', help="""Top-level clock for blocks running at system speed""") parser.add_option("--cpu-clock", action="store", type="string", default='2GHz', help="Clock for blocks running at CPU speed") parser.add_option( "--cpu-voltage", action="store", type="string", default='1.0V', help="""Top-level voltage for blocks running at CPU power supply""") parser.add_option("--tech-node", action="store", type="int", default=65, help="Technology node in nm") parser.add_option("--smt", action="store_true", default=False, help=""" Only used if multiple programs are specified. If true, then the number of threads per cpu is same as the number of programs.""") parser.add_option("--elastic-trace-en", action="store_true", help="""Enable capture of data dependency and instruction fetch traces using elastic trace probe.""") # Trace file paths input to trace probe in a capture simulation and input # to Trace CPU in a replay simulation parser.add_option("--inst-trace-file", action="store", type="string", help="""Instruction fetch trace file input to Elastic Trace probe in a capture simulation and Trace CPU in a replay simulation""", default="") parser.add_option("--data-trace-file", action="store", type="string", help="""Data dependency trace file input to Elastic Trace probe in a capture simulation and Trace CPU in a replay simulation""", default="") parser.add_option("--no-mcpat", action="store_true", default=False) # CPU conf. options parser.add_option( "--cpu-pipeline-width", action="store", type="string", # nargs='+', default="8") parser.add_option( "--cpu-LQentries", action="store", type="string", # nargs='+', default="32") parser.add_option( "--cpu-SQentries", action="store", type="string", # nargs='+', default="32") parser.add_option( "--cpu-IQentries", action="store", type="string", # nargs='+', default="64") parser.add_option( "--cpu-ROBentries", action="store", type="string", # nargs='+', default="192") parser.add_option( "--cpu-numPhysIntRegs", action="store", type="string", # nargs='+', default="256") parser.add_option( "--cpu-numPhysFloatRegs", action="store", type="string", # nargs='+', default="256") parser.add_option( "--cpu-localPredictorSize", action="store", type="string", # nargs='+', default="2048") parser.add_option( "--cpu-globalPredictorSize", action="store", type="string", # nargs='+', default="8192") parser.add_option( "--cpu-choicePredictorSize", action="store", type="string", # nargs='+', default="8192") parser.add_option( "--cpu-BTBEntries", action="store", type="string", # nargs='+', default="4096") parser.add_option( "--cpu-RASSize", action="store", type="string", # nargs='+', default="16") # Memory Options parser.add_option("--list-mem-types", action="callback", callback=_listMemTypes, help="List available memory types") parser.add_option("--mem-type", type="choice", default="DDR3_1600_x64", choices=MemConfig.mem_names(), help="type of memory to use") parser.add_option("--mem-channels", type="int", default=1, help="number of memory channels") parser.add_option("--mem-ranks", type="int", default=None, help="number of memory ranks per channel") parser.add_option("--mem-size", action="store", type="string", default="512MB", help="Specify the physical memory size (single memory)") parser.add_option("-l", "--lpae", action="store_true") parser.add_option("-V", "--virtualisation", action="store_true") parser.add_option("--memchecker", action="store_true") # Cache Options parser.add_option("--external-memory-system", type="string", help="use external ports of this port_type for caches") parser.add_option("--tlm-memory", type="string", help="use external port for SystemC TLM cosimulation") parser.add_option("--fastmem", action="store_true") parser.add_option("--caches", action="store_true") parser.add_option("--num-dirs", type="int", default=1) parser.add_option("--num-l2caches", type="string", default="1") #, nargs='+') parser.add_option("--l1d-size", type="string", default="32kB") #, nargs='+') parser.add_option("--l1i-size", type="string", default="16kB") #, nargs='+') parser.add_option("--l2-size", type="string", default="1MB") #, nargs='+') parser.add_option("--l1d-assoc", type="string", default="2") #, nargs='+') parser.add_option("--l1i-assoc", type="string", default="2") #, nargs='+') parser.add_option("--l2-assoc", type="string", default="8") #, nargs='+') parser.add_option("--cacheline_size", type="int", default=64) # Enable Ruby parser.add_option("--ruby", action="store_true") # Run duration options parser.add_option("-m", "--abs-max-tick", type="int", default=m5.MaxTick, metavar="TICKS", help="Run to absolute simulated tick " \ "specified including ticks from a restored checkpoint") parser.add_option("--rel-max-tick", type="int", default=None, metavar="TICKS", help="Simulate for specified number of" \ " ticks relative to the simulation start tick (e.g. if " \ "restoring a checkpoint)") parser.add_option("--maxtime", type="float", default=None, help="Run to the specified absolute simulated time in " \ "seconds") parser.add_option("-I", "--maxinsts", action="store", type="int", default=None, help="""Total number of instructions to simulate (default: run forever)""") parser.add_option("--work-item-id", action="store", type="int", help="the specific work id for exit & checkpointing") parser.add_option("--num-work-ids", action="store", type="int", help="Number of distinct work item types") parser.add_option("--work-begin-cpu-id-exit", action="store", type="int", help="exit when work starts on the specified cpu") parser.add_option("--work-end-exit-count", action="store", type="int", help="exit at specified work end count") parser.add_option("--work-begin-exit-count", action="store", type="int", help="exit at specified work begin count") parser.add_option("--init-param", action="store", type="int", default=0, help="""Parameter available in simulation with m5 initparam""") parser.add_option("--initialize-only", action="store_true", default=False, help="""Exit after initialization. Do not simulate time. Useful when gem5 is run as a library.""") # Simpoint options parser.add_option("--simpoint-profile", action="store_true", help="Enable basic block profiling for SimPoints") parser.add_option("--simpoint-interval", type="int", default=10000000, help="SimPoint interval in num of instructions") parser.add_option( "--take-simpoint-checkpoints", action="store", type="string", help="<simpoint file,weight file,interval-length,warmup-length>") parser.add_option("--restore-simpoint-checkpoint", action="store_true", help="restore from a simpoint checkpoint taken with " + "--take-simpoint-checkpoints") # Checkpointing options ###Note that performing checkpointing via python script files will override ###checkpoint instructions built into binaries. parser.add_option( "--take-checkpoints", action="store", type="string", help="<M,N> take checkpoints at tick M and every N ticks thereafter") parser.add_option("--max-checkpoints", action="store", type="int", help="the maximum number of checkpoints to drop", default=5) parser.add_option("--checkpoint-dir", action="store", type="string", help="Place all checkpoints in this absolute directory") parser.add_option("-r", "--checkpoint-restore", action="store", type="int", help="restore from checkpoint <N>") parser.add_option("--checkpoint-at-end", action="store_true", help="take a checkpoint at end of run") parser.add_option("--work-begin-checkpoint-count", action="store", type="int", help="checkpoint at specified work begin count") parser.add_option("--work-end-checkpoint-count", action="store", type="int", help="checkpoint at specified work end count") parser.add_option( "--work-cpus-checkpoint-count", action="store", type="int", help="checkpoint and exit when active cpu count is reached") parser.add_option("--restore-with-cpu", action="store", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help="cpu type for restoring from a checkpoint") # CPU Switching - default switch model goes from a checkpoint # to a timing simple CPU with caches to warm up, then to detailed CPU for # data measurement parser.add_option( "--repeat-switch", action="store", type="int", default=None, help="switch back and forth between CPUs with period <N>") parser.add_option( "-s", "--standard-switch", action="store", type="int", default=None, help="switch from timing to Detailed CPU after warmup period of <N>") parser.add_option("-p", "--prog-interval", type="str", help="CPU Progress Interval") # Fastforwarding and simpoint related materials parser.add_option( "-W", "--warmup-insts", action="store", type="int", default=None, help="Warmup period in total instructions (requires --standard-switch)" ) parser.add_option( "--bench", action="store", type="string", default=None, help="base names for --take-checkpoint and --checkpoint-restore") parser.add_option( "-F", "--fast-forward", action="store", type="string", default=None, help="Number of instructions to fast forward before switching") parser.add_option( "-S", "--simpoint", action="store_true", default=False, help="""Use workload simpoints as an instruction offset for --checkpoint-restore or --take-checkpoint.""") parser.add_option( "--at-instruction", action="store_true", default=False, help="""Treat value of --checkpoint-restore or --take-checkpoint as a number of instructions.""") parser.add_option( "--spec-input", default="ref", type="choice", choices=["ref", "test", "train", "smred", "mdred", "lgred"], help="Input set size for SPEC CPU2000 benchmarks.") parser.add_option("--arm-iset", default="arm", type="choice", choices=["arm", "thumb", "aarch64"], help="ARM instruction set.")
def addCommonOptions(parser): # system options parser.add_option("--list-cpu-types", action="callback", callback=_listCpuTypes, help="List available CPU types") parser.add_option("--cpu-type", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help="type of cpu to run with") parser.add_option("--list-mem-types", action="callback", callback=_listMemTypes, help="List available memory types") parser.add_option("--mem-type", type="choice", default="simple_mem", choices=MemConfig.mem_names(), help="type of memory to use") parser.add_option("--checker", action="store_true") parser.add_option("-n", "--num-cpus", type="int", default=1) parser.add_option("--caches", action="store_true") parser.add_option("--l2cache", action="store_true") parser.add_option("--fastmem", action="store_true") parser.add_option("--simpoint-profile", action="store_true", help="Enable basic block profiling for SimPoints") parser.add_option("--simpoint-interval", type="int", default=10000000, help="SimPoint interval in num of instructions") parser.add_option("--clock", action="store", type="string", default='2GHz') parser.add_option("--num-dirs", type="int", default=1) parser.add_option("--num-l2caches", type="int", default=1) parser.add_option("--num-l3caches", type="int", default=1) parser.add_option("--l1d_size", type="string", default="64kB") parser.add_option("--l1i_size", type="string", default="32kB") parser.add_option("--l2_size", type="string", default="2MB") parser.add_option("--l3_size", type="string", default="16MB") parser.add_option("--l1d_assoc", type="int", default=2) parser.add_option("--l1i_assoc", type="int", default=2) parser.add_option("--l2_assoc", type="int", default=8) parser.add_option("--l3_assoc", type="int", default=16) parser.add_option("--cacheline_size", type="int", default=64) parser.add_option("--ruby", action="store_true") parser.add_option("--smt", action="store_true", default=False, help=""" Only used if multiple programs are specified. If true, then the number of threads per cpu is same as the number of programs.""") # Run duration options parser.add_option("-m", "--maxtick", type="int", default=m5.MaxTick, metavar="T", help="Stop after T ticks") parser.add_option("--maxtime", type="float") parser.add_option("-I", "--maxinsts", action="store", type="int", default=None, help="""Total number of instructions to simulate (default: run forever)""") parser.add_option("--work-item-id", action="store", type="int", help="the specific work id for exit & checkpointing") parser.add_option("--work-begin-cpu-id-exit", action="store", type="int", help="exit when work starts on the specified cpu") parser.add_option("--work-end-exit-count", action="store", type="int", help="exit at specified work end count") parser.add_option("--work-begin-exit-count", action="store", type="int", help="exit at specified work begin count") parser.add_option("--init-param", action="store", type="int", default=0, help="""Parameter available in simulation with m5 initparam""") # Checkpointing options ###Note that performing checkpointing via python script files will override ###checkpoint instructions built into binaries. parser.add_option( "--take-checkpoints", action="store", type="string", help="<M,N> take checkpoints at tick M and every N ticks thereafter") parser.add_option("--max-checkpoints", action="store", type="int", help="the maximum number of checkpoints to drop", default=5) parser.add_option("--checkpoint-dir", action="store", type="string", help="Place all checkpoints in this absolute directory") parser.add_option("-r", "--checkpoint-restore", action="store", type="int", help="restore from checkpoint <N>") parser.add_option("--checkpoint-at-end", action="store_true", help="take a checkpoint at end of run") parser.add_option("--work-begin-checkpoint-count", action="store", type="int", help="checkpoint at specified work begin count") parser.add_option("--work-end-checkpoint-count", action="store", type="int", help="checkpoint at specified work end count") parser.add_option( "--work-cpus-checkpoint-count", action="store", type="int", help="checkpoint and exit when active cpu count is reached") parser.add_option("--restore-with-cpu", action="store", type="choice", default="atomic", choices=["atomic", "timing", "detailed", "inorder"], help="cpu type for restoring from a checkpoint") # CPU Switching - default switch model goes from a checkpoint # to a timing simple CPU with caches to warm up, then to detailed CPU for # data measurement parser.add_option( "--repeat-switch", action="store", type="int", default=None, help="switch back and forth between CPUs with period <N>") parser.add_option( "-s", "--standard-switch", action="store", type="int", default=None, help="switch from timing to Detailed CPU after warmup period of <N>") parser.add_option("-p", "--prog-interval", type="str", help="CPU Progress Interval") # Fastforwarding and simpoint related materials parser.add_option( "-W", "--warmup-insts", action="store", type="int", default=None, help="Warmup period in total instructions (requires --standard-switch)" ) parser.add_option( "--bench", action="store", type="string", default=None, help="base names for --take-checkpoint and --checkpoint-restore") parser.add_option( "-F", "--fast-forward", action="store", type="string", default=None, help="Number of instructions to fast forward before switching") parser.add_option( "-S", "--simpoint", action="store_true", default=False, help="""Use workload simpoints as an instruction offset for --checkpoint-restore or --take-checkpoint.""") parser.add_option( "--at-instruction", action="store_true", default=False, help="""Treat value of --checkpoint-restore or --take-checkpoint as a number of instructions.""")
def getOptions(): def _listCpuTypes(option, opt, value, parser): CpuConfig.print_cpu_list() sys.exit(0) def _listMemTypes(option, opt, value, parser): MemConfig.print_mem_list() sys.exit(0) parser = optparse.OptionParser() parser.add_option("--list-cpu-types", action="callback", callback=_listCpuTypes, help="List available CPU types") parser.add_option("--cpu-type", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help="type of cpu to run with") parser.add_option("-c", "--cmd", default="", type="string", help="comma separated list of binaries") parser.add_option("--list-mem-types", action="callback", callback=_listMemTypes, help="List available memory types") parser.add_option("--mem-type", type="choice", default="DDR4_2400_x64", choices=MemConfig.mem_names(), help="type of memory to use") parser.add_option("--mem-channels", type="int", default=1, help="number of memory channels") parser.add_option("--mem-ranks", type="int", default=None, help="number of memory ranks per channel") parser.add_option("--pausepe", default=-1, type="int", help="the PE to pause until GDB connects") parser.add_option( "--remote-gdb-port", type='int', default=7000, help="Remote gdb base port (set to 0 to disable listening)") parser.add_option("--debug-start", metavar="TIME", type='int', help="Start debug output at TIME (must be in ticks)") parser.add_option("--sys-voltage", action="store", type="string", default='1.0V', help="""Top-level voltage for blocks running at system power supply""") parser.add_option("--sys-clock", action="store", type="string", default='1GHz', help="""Top-level clock for blocks running at system speed""") parser.add_option("--cpu-clock", action="store", type="string", default='2GHz', help="Clock for blocks running at CPU speed") parser.add_option("-m", "--maxtick", type="int", default=m5.MaxTick, metavar="T", help="Stop after T ticks") Options.addFSOptions(parser) (options, args) = parser.parse_args() if args: print "Error: script doesn't take any positional arguments" sys.exit(1) return options
def addCommonOptions(parser): # system options parser.add_option("--list-cpu-types", action="callback", callback=_listCpuTypes, help="List available CPU types") parser.add_option("--cpu-type", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help = "type of cpu to run with") parser.add_option("--checker", action="store_true"); parser.add_option("-n", "--num-cpus", type="int", default=1) parser.add_option("--sys-voltage", action="store", type="string", default='1.0V', help = """Top-level voltage for blocks running at system power supply""") parser.add_option("--sys-clock", action="store", type="string", default='1GHz', help = """Top-level clock for blocks running at system speed""") parser.add_option("--cpu-clock", action="store", type="string", default='2GHz', help="Clock for blocks running at CPU speed") parser.add_option("--smt", action="store_true", default=False, help = """ Only used if multiple programs are specified. If true, then the number of threads per cpu is same as the number of programs.""") # Memory Options parser.add_option("--list-mem-types", action="callback", callback=_listMemTypes, help="List available memory types") parser.add_option("--mem-type", type="choice", default="ddr3_1600_x64", choices=MemConfig.mem_names(), help = "type of memory to use") parser.add_option("--mem-channels", type="int", default=1, help = "number of memory channels") parser.add_option("--mem-size", action="store", type="string", default="512MB", help="Specify the physical memory size (single memory)") parser.add_option("-l", "--lpae", action="store_true") parser.add_option("-V", "--virtualisation", action="store_true") # Cache Options parser.add_option("--caches", action="store_true") parser.add_option("--l2cache", action="store_true") parser.add_option("--fastmem", action="store_true") parser.add_option("--num-dirs", type="int", default=1) parser.add_option("--num-l2caches", type="int", default=1) parser.add_option("--num-l3caches", type="int", default=1) parser.add_option("--l1d_size", type="string", default="64kB") parser.add_option("--l1i_size", type="string", default="32kB") parser.add_option("--l2_size", type="string", default="2MB") parser.add_option("--l3_size", type="string", default="16MB") parser.add_option("--l1d_assoc", type="int", default=2) parser.add_option("--l1i_assoc", type="int", default=2) parser.add_option("--l2_assoc", type="int", default=8) parser.add_option("--l3_assoc", type="int", default=16) parser.add_option("--cacheline_size", type="int", default=64) # Enable Ruby parser.add_option("--ruby", action="store_true") # Run duration options parser.add_option("-m", "--abs-max-tick", type="int", default=m5.MaxTick, metavar="TICKS", help="Run to absolute simulated tick " \ "specified including ticks from a restored checkpoint") parser.add_option("--rel-max-tick", type="int", default=None, metavar="TICKS", help="Simulate for specified number of" \ " ticks relative to the simulation start tick (e.g. if " \ "restoring a checkpoint)") parser.add_option("--maxtime", type="float", default=None, help="Run to the specified absolute simulated time in " \ "seconds") parser.add_option("-I", "--maxinsts", action="store", type="int", default=None, help="""Total number of instructions to simulate (default: run forever)""") parser.add_option("--work-item-id", action="store", type="int", help="the specific work id for exit & checkpointing") parser.add_option("--num-work-ids", action="store", type="int", help="Number of distinct work item types") parser.add_option("--work-begin-cpu-id-exit", action="store", type="int", help="exit when work starts on the specified cpu") parser.add_option("--work-end-exit-count", action="store", type="int", help="exit at specified work end count") parser.add_option("--work-begin-exit-count", action="store", type="int", help="exit at specified work begin count") parser.add_option("--init-param", action="store", type="int", default=0, help="""Parameter available in simulation with m5 initparam""") # Simpoint options parser.add_option("--simpoint-profile", action="store_true", help="Enable basic block profiling for SimPoints") parser.add_option("--simpoint-interval", type="int", default=10000000, help="SimPoint interval in num of instructions") # Checkpointing options ###Note that performing checkpointing via python script files will override ###checkpoint instructions built into binaries. parser.add_option("--take-checkpoints", action="store", type="string", help="<M,N> take checkpoints at tick M and every N ticks thereafter") parser.add_option("--max-checkpoints", action="store", type="int", help="the maximum number of checkpoints to drop", default=5) parser.add_option("--checkpoint-dir", action="store", type="string", help="Place all checkpoints in this absolute directory") parser.add_option("-r", "--checkpoint-restore", action="store", type="int", help="restore from checkpoint <N>") parser.add_option("--checkpoint-at-end", action="store_true", help="take a checkpoint at end of run") parser.add_option("--work-begin-checkpoint-count", action="store", type="int", help="checkpoint at specified work begin count") parser.add_option("--work-end-checkpoint-count", action="store", type="int", help="checkpoint at specified work end count") parser.add_option("--work-cpus-checkpoint-count", action="store", type="int", help="checkpoint and exit when active cpu count is reached") parser.add_option("--restore-with-cpu", action="store", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help = "cpu type for restoring from a checkpoint") # CPU Switching - default switch model goes from a checkpoint # to a timing simple CPU with caches to warm up, then to detailed CPU for # data measurement parser.add_option("--repeat-switch", action="store", type="int", default=None, help="switch back and forth between CPUs with period <N>") parser.add_option("-s", "--standard-switch", action="store", type="int", default=None, help="switch from timing to Detailed CPU after warmup period of <N>") parser.add_option("-p", "--prog-interval", type="str", help="CPU Progress Interval") # Fastforwarding and simpoint related materials parser.add_option("-W", "--warmup-insts", action="store", type="int", default=None, help="Warmup period in total instructions (requires --standard-switch)") parser.add_option("--bench", action="store", type="string", default=None, help="base names for --take-checkpoint and --checkpoint-restore") parser.add_option("-F", "--fast-forward", action="store", type="string", default=None, help="Number of instructions to fast forward before switching") parser.add_option("-S", "--simpoint", action="store_true", default=False, help="""Use workload simpoints as an instruction offset for --checkpoint-restore or --take-checkpoint.""") parser.add_option("--at-instruction", action="store_true", default=False, help="""Treat value of --checkpoint-restore or --take-checkpoint as a number of instructions.""") parser.add_option("--spec-input", default="ref", type="choice", choices=["ref", "test", "train", "smred", "mdred", "lgred"], help="Input set size for SPEC CPU2000 benchmarks.") parser.add_option("--arm-iset", default="arm", type="choice", choices=["arm", "thumb", "aarch64"], help="ARM instruction set.") # GemDroid options parser.add_option("--gemdroid", action="store_true", help="To enable <<< GemDroid >>> functionalities.") parser.add_option("--num_cpu_traces", type="int", default=1, help="Number of CPU trace files.") parser.add_option("--governor", type="int", default=1, help="Voltage Frequency governor: 0 - Disable; 1 - OnDemand; 2 - Performance; 3 - PowerSaving; 4 - Building; 5 - Interactive; 6 - Powercap; 7 - Slack; 8 - SlackOptimal") parser.add_option("--governor_timing", type="int", default=1, help="When to do DVFS: 1 - 10ms Fixed; 2 - 1ms Fixed; 3 - Frame Boundaries; 4 - IP Frame Boundaries") parser.add_option("--ip_freq", type="int", default=500, help="IP Freq in MHz.") parser.add_option("--core_freq", type="int", default=1000, help="CPU Freq in MHz.") parser.add_option("--mem_freq", type="int", default=800, help="Mem Freq in MHz.") parser.add_option("--cpu_trace1", action="store", type="string", default="none", help="Path to the CPU trace file1.") parser.add_option("--cpu_trace2", action="store", type="string", default="none", help="Path to the CPU trace file2.") parser.add_option("--cpu_trace3", action="store", type="string", default="none", help="Path to the CPU trace file3.") parser.add_option("--cpu_trace4", action="store", type="string", default="none", help="Path to the CPU trace file4.") parser.add_option("--gpu_trace", action="store", type="string", default="none.txt", help="Path to the GPU trace file.") parser.add_option("--perfect_memory", action="store_true", help="Enable perfect memory.") parser.add_option("--no_periodic_stats", action="store_true", help="Disable periodic stats from GemDroid code.") parser.add_option("--sweep_val1", type="float", default=1, help="Value to use for the current sweep variable1.") parser.add_option("--sweep_val2", type="float", default=1, help="Value to use for the current sweep variable2.") parser.add_option("--device_config", type="string", default="ini/LPDDR3_micron_32M_8B_x8_sg15.ini", help="Mem Device configuration.") parser.add_option("--system_config", type="string", default="gemdroid.ini", help="Mem System configuration.")
def addCommonOptions(parser): # system options parser.add_option("--list-cpu-types", action="callback", callback=_listCpuTypes, help="List available CPU types") parser.add_option("--cpu-type", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help = "type of cpu to run with") parser.add_option("--checker", action="store_true"); parser.add_option("-n", "--num-cpus", type="int", default=1) parser.add_option("--sys-voltage", action="store", type="string", default='1.0V', help = """Top-level voltage for blocks running at system power supply""") parser.add_option("--sys-clock", action="store", type="string", default='1GHz', help = """Top-level clock for blocks running at system speed""") parser.add_option("--cpu-clock", action="store", type="string", default='1GHz', help="Clock for blocks running at CPU speed") parser.add_option("--smt", action="store_true", default=False, help = """ Only used if multiple programs are specified. If true, then the number of threads per cpu is same as the number of programs.""") # Memory Options parser.add_option("--list-mem-types", action="callback", callback=_listMemTypes, help="List available memory types") parser.add_option("--mem-type", type="choice", default="simple_mem", choices=MemConfig.mem_names(), help = "type of memory to use") parser.add_option("--mem-channels", type="int", default=1, help = "number of memory channels") parser.add_option("--mem-size", action="store", type="string", default="4GB", help="Specify the physical memory size (single memory)") # Cache Options parser.add_option("--caches", action="store_true") parser.add_option("--l2cache", action="store_true") #PRODROMOU parser.add_option("--l3cache", action = "store_true", help = "Enable L3 cache (Implies L2)") parser.add_option("-b", "--benchmark", default="", help="The benchmark to be loaded.") parser.add_option("--bench-size", default="ref", help="The size of the benchmark <train/ref>") parser.add_option("--total-insts", type="int", default = 0, # by default "if options.total_insts" fails help="If defined, the simulation is going to keep running until the total number of instructions has been executed accross all threads") parser.add_option("--mempolicy", default = "frfcfs", help="The memory controller scheduling policy to be used") parser.add_option("--ckpt-nickname", default=None, type="string", help="If defined, the simulator will use it as part of the checkpoint's name. Example (nickname set as memIntense): cpt.memIntense.20140693 instead of cpt.None.20140693") parser.add_option("--mutlu", action="store_true", help="Creates the mem hierarchy used in Mutlu's Par-BS paper") parser.add_option("-d", "--dump-interval", default=0, type="int", help="Dumps statistics every defined interval") parser.add_option("--per-access-slowdown", default="0ns", type="string", help="Sets the MC's static delay per access. Only used custom_tcl MC class") parser.add_option("--slowdown-accesses", default=False, action="store_true", help="Enables per access slowdown. Amount of delay passed with --per-access-slowdown") #PRODROMOU parser.add_option("--fastmem", action="store_true") parser.add_option("--num-dirs", type="int", default=1) parser.add_option("--num-l2caches", type="int", default=1) parser.add_option("--num-l3caches", type="int", default=1) parser.add_option("--l1d_size", type="string", default="32kB") parser.add_option("--l1i_size", type="string", default="32kB") parser.add_option("--l2_size", type="string", default="512kB") parser.add_option("--l3_size", type="string", default="16MB") parser.add_option("--l1d_assoc", type="int", default=2) parser.add_option("--l1i_assoc", type="int", default=2) parser.add_option("--l2_assoc", type="int", default=8) parser.add_option("--l3_assoc", type="int", default=16) parser.add_option("--cacheline_size", type="int", default=64) # Enable Ruby parser.add_option("--ruby", action="store_true") # Run duration options parser.add_option("-m", "--abs-max-tick", type="int", default=None, metavar="TICKS", help="Run to absolute simulated tick " \ "specified including ticks from a restored checkpoint") parser.add_option("--rel-max-tick", type="int", default=None, metavar="TICKS", help="Simulate for specified number of" \ " ticks relative to the simulation start tick (e.g. if " \ "restoring a checkpoint)") parser.add_option("--maxtime", type="float", default=None, help="Run to the specified absolute simulated time in " \ "seconds") parser.add_option("-I", "--maxinsts", action="store", type="int", default=None, help="""Total number of instructions to simulate (default: run forever)""") parser.add_option("--work-item-id", action="store", type="int", help="the specific work id for exit & checkpointing") parser.add_option("--work-begin-cpu-id-exit", action="store", type="int", help="exit when work starts on the specified cpu") parser.add_option("--work-end-exit-count", action="store", type="int", help="exit at specified work end count") parser.add_option("--work-begin-exit-count", action="store", type="int", help="exit at specified work begin count") parser.add_option("--init-param", action="store", type="int", default=0, help="""Parameter available in simulation with m5 initparam""") # Simpoint options parser.add_option("--simpoint-profile", action="store_true", help="Enable basic block profiling for SimPoints") parser.add_option("--simpoint-interval", type="int", default=10000000, help="SimPoint interval in num of instructions") # Checkpointing options ###Note that performing checkpointing via python script files will override ###checkpoint instructions built into binaries. parser.add_option("--take-checkpoints", action="store", type="string", help="<M,N> take checkpoints at tick M and every N ticks thereafter") parser.add_option("--max-checkpoints", action="store", type="int", help="the maximum number of checkpoints to drop", default=5) parser.add_option("--checkpoint-dir", action="store", type="string", help="Place all checkpoints in this absolute directory") parser.add_option("-r", "--checkpoint-restore", action="store", type="int", help="restore from checkpoint <N>") parser.add_option("--checkpoint-at-end", action="store_true", help="take a checkpoint at end of run") parser.add_option("--work-begin-checkpoint-count", action="store", type="int", help="checkpoint at specified work begin count") parser.add_option("--work-end-checkpoint-count", action="store", type="int", help="checkpoint at specified work end count") parser.add_option("--work-cpus-checkpoint-count", action="store", type="int", help="checkpoint and exit when active cpu count is reached") parser.add_option("--restore-with-cpu", action="store", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help = "cpu type for restoring from a checkpoint") # CPU Switching - default switch model goes from a checkpoint # to a timing simple CPU with caches to warm up, then to detailed CPU for # data measurement parser.add_option("--repeat-switch", action="store", type="int", default=None, help="switch back and forth between CPUs with period <N>") parser.add_option("-s", "--standard-switch", action="store", type="int", default=None, help="switch from timing to Detailed CPU after warmup period of <N>") parser.add_option("-p", "--prog-interval", type="str", help="CPU Progress Interval") # Fastforwarding and simpoint related materials parser.add_option("-W", "--warmup-insts", action="store", type="int", default=None, help="Warmup period in total instructions (requires --standard-switch)") parser.add_option("--bench", action="store", type="string", default=None, help="base names for --take-checkpoint and --checkpoint-restore") parser.add_option("-F", "--fast-forward", action="store", type="string", default=None, help="Number of instructions to fast forward before switching") parser.add_option("-S", "--simpoint", action="store_true", default=False, help="""Use workload simpoints as an instruction offset for --checkpoint-restore or --take-checkpoint.""") parser.add_option("--at-instruction", action="store_true", default=False, help="""Treat value of --checkpoint-restore or --take-checkpoint as a number of instructions.""")
def addCommonOptions(parser): # system options parser.add_option("--list-cpu-types", action="callback", callback=_listCpuTypes, help="List available CPU types") parser.add_option("--cpu-type", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help="type of cpu to run with") parser.add_option("--checker", action="store_true") parser.add_option("-n", "--num-cpus", type="int", default=1) parser.add_option("--sys-voltage", action="store", type="string", default='1.0V', help="""Top-level voltage for blocks running at system power supply""") parser.add_option("--sys-clock", action="store", type="string", default='1GHz', help="""Top-level clock for blocks running at system speed""") parser.add_option("--cpu-clock", action="store", type="string", default='1GHz', help="Clock for blocks running at CPU speed") parser.add_option("--smt", action="store_true", default=False, help=""" Only used if multiple programs are specified. If true, then the number of threads per cpu is same as the number of programs.""") # Memory Options parser.add_option("--list-mem-types", action="callback", callback=_listMemTypes, help="List available memory types") parser.add_option("--mem-type", type="choice", default="simple_mem", choices=MemConfig.mem_names(), help="type of memory to use") parser.add_option("--mem-channels", type="int", default=1, help="number of memory channels") parser.add_option("--mem-size", action="store", type="string", default="4GB", help="Specify the physical memory size (single memory)") # Cache Options parser.add_option("--caches", action="store_true") parser.add_option("--l2cache", action="store_true") #PRODROMOU parser.add_option("--l3cache", action="store_true", help="Enable L3 cache (Implies L2)") parser.add_option("-b", "--benchmark", default="", help="The benchmark to be loaded.") parser.add_option("--bench-size", default="ref", help="The size of the benchmark <train/ref>") parser.add_option( "--total-insts", type="int", default=0, # by default "if options.total_insts" fails help= "If defined, the simulation is going to keep running until the total number of instructions has been executed accross all threads" ) parser.add_option( "--mempolicy", default="frfcfs", help="The memory controller scheduling policy to be used") parser.add_option( "--ckpt-nickname", default=None, type="string", help= "If defined, the simulator will use it as part of the checkpoint's name. Example (nickname set as memIntense): cpt.memIntense.20140693 instead of cpt.None.20140693" ) parser.add_option( "--mutlu", action="store_true", help="Creates the mem hierarchy used in Mutlu's Par-BS paper") parser.add_option("-d", "--dump-interval", default=0, type="int", help="Dumps statistics every defined interval") parser.add_option( "--per-access-slowdown", default="0ns", type="string", help= "Sets the MC's static delay per access. Only used custom_tcl MC class") parser.add_option( "--slowdown-accesses", default=False, action="store_true", help= "Enables per access slowdown. Amount of delay passed with --per-access-slowdown" ) #PRODROMOU parser.add_option("--fastmem", action="store_true") parser.add_option("--num-dirs", type="int", default=1) parser.add_option("--num-l2caches", type="int", default=1) parser.add_option("--num-l3caches", type="int", default=1) parser.add_option("--l1d_size", type="string", default="32kB") parser.add_option("--l1i_size", type="string", default="32kB") parser.add_option("--l2_size", type="string", default="512kB") parser.add_option("--l3_size", type="string", default="16MB") parser.add_option("--l1d_assoc", type="int", default=2) parser.add_option("--l1i_assoc", type="int", default=2) parser.add_option("--l2_assoc", type="int", default=8) parser.add_option("--l3_assoc", type="int", default=16) parser.add_option("--cacheline_size", type="int", default=64) # Enable Ruby parser.add_option("--ruby", action="store_true") # Run duration options parser.add_option("-m", "--abs-max-tick", type="int", default=None, metavar="TICKS", help="Run to absolute simulated tick " \ "specified including ticks from a restored checkpoint") parser.add_option("--rel-max-tick", type="int", default=None, metavar="TICKS", help="Simulate for specified number of" \ " ticks relative to the simulation start tick (e.g. if " \ "restoring a checkpoint)") parser.add_option("--maxtime", type="float", default=None, help="Run to the specified absolute simulated time in " \ "seconds") parser.add_option("-I", "--maxinsts", action="store", type="int", default=None, help="""Total number of instructions to simulate (default: run forever)""") parser.add_option("--work-item-id", action="store", type="int", help="the specific work id for exit & checkpointing") parser.add_option("--work-begin-cpu-id-exit", action="store", type="int", help="exit when work starts on the specified cpu") parser.add_option("--work-end-exit-count", action="store", type="int", help="exit at specified work end count") parser.add_option("--work-begin-exit-count", action="store", type="int", help="exit at specified work begin count") parser.add_option("--init-param", action="store", type="int", default=0, help="""Parameter available in simulation with m5 initparam""") # Simpoint options parser.add_option("--simpoint-profile", action="store_true", help="Enable basic block profiling for SimPoints") parser.add_option("--simpoint-interval", type="int", default=10000000, help="SimPoint interval in num of instructions") # Checkpointing options ###Note that performing checkpointing via python script files will override ###checkpoint instructions built into binaries. parser.add_option( "--take-checkpoints", action="store", type="string", help="<M,N> take checkpoints at tick M and every N ticks thereafter") parser.add_option("--max-checkpoints", action="store", type="int", help="the maximum number of checkpoints to drop", default=5) parser.add_option("--checkpoint-dir", action="store", type="string", help="Place all checkpoints in this absolute directory") parser.add_option("-r", "--checkpoint-restore", action="store", type="int", help="restore from checkpoint <N>") parser.add_option("--checkpoint-at-end", action="store_true", help="take a checkpoint at end of run") parser.add_option("--work-begin-checkpoint-count", action="store", type="int", help="checkpoint at specified work begin count") parser.add_option("--work-end-checkpoint-count", action="store", type="int", help="checkpoint at specified work end count") parser.add_option( "--work-cpus-checkpoint-count", action="store", type="int", help="checkpoint and exit when active cpu count is reached") parser.add_option("--restore-with-cpu", action="store", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help="cpu type for restoring from a checkpoint") # CPU Switching - default switch model goes from a checkpoint # to a timing simple CPU with caches to warm up, then to detailed CPU for # data measurement parser.add_option( "--repeat-switch", action="store", type="int", default=None, help="switch back and forth between CPUs with period <N>") parser.add_option( "-s", "--standard-switch", action="store", type="int", default=None, help="switch from timing to Detailed CPU after warmup period of <N>") parser.add_option("-p", "--prog-interval", type="str", help="CPU Progress Interval") # Fastforwarding and simpoint related materials parser.add_option( "-W", "--warmup-insts", action="store", type="int", default=None, help="Warmup period in total instructions (requires --standard-switch)" ) parser.add_option( "--bench", action="store", type="string", default=None, help="base names for --take-checkpoint and --checkpoint-restore") parser.add_option( "-F", "--fast-forward", action="store", type="string", default=None, help="Number of instructions to fast forward before switching") parser.add_option( "-S", "--simpoint", action="store_true", default=False, help="""Use workload simpoints as an instruction offset for --checkpoint-restore or --take-checkpoint.""") parser.add_option( "--at-instruction", action="store_true", default=False, help="""Treat value of --checkpoint-restore or --take-checkpoint as a number of instructions.""")
def addCommonOptions(parser): # system options parser.add_option("--list-cpu-types", action="callback", callback=_listCpuTypes, help="List available CPU types") parser.add_option("--cpu-type", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help = "type of cpu to run with") parser.add_option("--checker", action="store_true"); parser.add_option("-n", "--num-cpus", type="int", default=1) parser.add_option("--sys-voltage", action="store", type="string", default='1.0V', help = """Top-level voltage for blocks running at system power supply""") parser.add_option("--sys-clock", action="store", type="string", default='1GHz', help = """Top-level clock for blocks running at system speed""") parser.add_option("--cpu-clock", action="store", type="string", default='2GHz', help="Clock for blocks running at CPU speed") parser.add_option("--smt", action="store_true", default=False, help = """ Only used if multiple programs are specified. If true, then the number of threads per cpu is same as the number of programs.""") # Memory Options parser.add_option("--list-mem-types", action="callback", callback=_listMemTypes, help="List available memory types") parser.add_option("--mem-type", type="choice", default="DDR3_1600_x64", choices=MemConfig.mem_names(), help = "type of memory to use") parser.add_option("--mem-channels", type="int", default=1, help = "number of memory channels") parser.add_option("--mem-ranks", type="int", default=None, help = "number of memory ranks per channel") parser.add_option("--mem-size", action="store", type="string", default="512MB", help="Specify the physical memory size (single memory)") parser.add_option("-l", "--lpae", action="store_true") parser.add_option("-V", "--virtualisation", action="store_true") parser.add_option("--memchecker", action="store_true") # Cache Options parser.add_option("--external-memory-system", type="string", help="use external ports of this port_type for caches") parser.add_option("--tlm-memory", type="string", help="use external port for SystemC TLM cosimulation") parser.add_option("--caches", action="store_true") parser.add_option("--l2cache", action="store_true") parser.add_option("--fastmem", action="store_true") parser.add_option("--num-dirs", type="int", default=1) parser.add_option("--num-l2caches", type="int", default=1) parser.add_option("--num-l3caches", type="int", default=1) parser.add_option("--l1d_size", type="string", default="64kB") parser.add_option("--l1i_size", type="string", default="32kB") parser.add_option("--l2_size", type="string", default="2MB") parser.add_option("--l3_size", type="string", default="16MB") parser.add_option("--l1d_assoc", type="int", default=2) parser.add_option("--l1i_assoc", type="int", default=2) parser.add_option("--l2_assoc", type="int", default=8) parser.add_option("--l3_assoc", type="int", default=16) parser.add_option("--l2_tags", type="string", default="LRU") parser.add_option("--cacheline_size", type="int", default=64) # Enable Ruby parser.add_option("--ruby", action="store_true") # Run duration options parser.add_option("-m", "--abs-max-tick", type="int", default=m5.MaxTick, metavar="TICKS", help="Run to absolute simulated tick " \ "specified including ticks from a restored checkpoint") parser.add_option("--rel-max-tick", type="int", default=None, metavar="TICKS", help="Simulate for specified number of" \ " ticks relative to the simulation start tick (e.g. if " \ "restoring a checkpoint)") parser.add_option("--maxtime", type="float", default=None, help="Run to the specified absolute simulated time in " \ "seconds") parser.add_option("-I", "--maxinsts", action="store", type="int", default=None, help="""Total number of instructions to simulate (default: run forever)""") parser.add_option("--work-item-id", action="store", type="int", help="the specific work id for exit & checkpointing") parser.add_option("--num-work-ids", action="store", type="int", help="Number of distinct work item types") parser.add_option("--work-begin-cpu-id-exit", action="store", type="int", help="exit when work starts on the specified cpu") parser.add_option("--work-end-exit-count", action="store", type="int", help="exit at specified work end count") parser.add_option("--work-begin-exit-count", action="store", type="int", help="exit at specified work begin count") parser.add_option("--init-param", action="store", type="int", default=0, help="""Parameter available in simulation with m5 initparam""") parser.add_option("--initialize-only", action="store_true", default=False, help="""Exit after initialization. Do not simulate time. Useful when gem5 is run as a library.""") # Simpoint options parser.add_option("--simpoint-profile", action="store_true", help="Enable basic block profiling for SimPoints") parser.add_option("--simpoint-interval", type="int", default=10000000, help="SimPoint interval in num of instructions") parser.add_option("--take-simpoint-checkpoints", action="store", type="string", help="<simpoint file,weight file,interval-length,warmup-length>") parser.add_option("--restore-simpoint-checkpoint", action="store_true", help="restore from a simpoint checkpoint taken with " + "--take-simpoint-checkpoints") # Checkpointing options ###Note that performing checkpointing via python script files will override ###checkpoint instructions built into binaries. parser.add_option("--take-checkpoints", action="store", type="string", help="<M,N> take checkpoints at tick M and every N ticks thereafter") parser.add_option("--max-checkpoints", action="store", type="int", help="the maximum number of checkpoints to drop", default=5) parser.add_option("--checkpoint-dir", action="store", type="string", help="Place all checkpoints in this absolute directory") parser.add_option("-r", "--checkpoint-restore", action="store", type="int", help="restore from checkpoint <N>") parser.add_option("--checkpoint-at-end", action="store_true", help="take a checkpoint at end of run") parser.add_option("--work-begin-checkpoint-count", action="store", type="int", help="checkpoint at specified work begin count") parser.add_option("--work-end-checkpoint-count", action="store", type="int", help="checkpoint at specified work end count") parser.add_option("--work-cpus-checkpoint-count", action="store", type="int", help="checkpoint and exit when active cpu count is reached") parser.add_option("--restore-with-cpu", action="store", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help = "cpu type for restoring from a checkpoint") # CPU Switching - default switch model goes from a checkpoint # to a timing simple CPU with caches to warm up, then to detailed CPU for # data measurement parser.add_option("--repeat-switch", action="store", type="int", default=None, help="switch back and forth between CPUs with period <N>") parser.add_option("-s", "--standard-switch", action="store", type="int", default=None, help="switch from timing to Detailed CPU after warmup period of <N>") parser.add_option("-p", "--prog-interval", type="str", help="CPU Progress Interval") parser.add_option("--two-phase", action="store", help="switch from atomic to timing CPU after kernel boots") # Fastforwarding and simpoint related materials parser.add_option("-W", "--warmup-insts", action="store", type="int", default=None, help="Warmup period in total instructions (requires --standard-switch)") parser.add_option("--bench", action="store", type="string", default=None, help="base names for --take-checkpoint and --checkpoint-restore") parser.add_option("-F", "--fast-forward", action="store", type="string", default=None, help="Number of instructions to fast forward before switching") parser.add_option("-S", "--simpoint", action="store_true", default=False, help="""Use workload simpoints as an instruction offset for --checkpoint-restore or --take-checkpoint.""") parser.add_option("--at-instruction", action="store_true", default=False, help="""Treat value of --checkpoint-restore or --take-checkpoint as a number of instructions.""") parser.add_option("--spec-input", default="ref", type="choice", choices=["ref", "test", "train", "smred", "mdred", "lgred"], help="Input set size for SPEC CPU2000 benchmarks.") parser.add_option("--arm-iset", default="arm", type="choice", choices=["arm", "thumb", "aarch64"], help="ARM instruction set.")
def addCommonOptions(parser): # system options parser.add_option("--list-cpu-types", action="callback", callback=_listCpuTypes, help="List available CPU types") parser.add_option("--cpu-type", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help = "type of cpu to run with") parser.add_option("--checker", action="store_true"); parser.add_option("-n", "--num-cpus", type="int", default=1) parser.add_option("--sys-voltage", action="store", type="string", default='1.0V', help = """Top-level voltage for blocks running at system power supply""") parser.add_option("--sys-clock", action="store", type="string", default='1GHz', help = """Top-level clock for blocks running at system speed""") parser.add_option("--cpu-clock", action="store", type="string", default='2GHz', help="Clock for blocks running at CPU speed") parser.add_option("--smt", action="store_true", default=False, help = """ Only used if multiple programs are specified. If true, then the number of threads per cpu is same as the number of programs.""") parser.add_option("--elastic-trace-en", action="store_true", help="""Enable capture of data dependency and instruction fetch traces using elastic trace probe.""") # Trace file paths input to trace probe in a capture simulation and input # to Trace CPU in a replay simulation parser.add_option("--inst-trace-file", action="store", type="string", help="""Instruction fetch trace file input to Elastic Trace probe in a capture simulation and Trace CPU in a replay simulation""", default="") parser.add_option("--data-trace-file", action="store", type="string", help="""Data dependency trace file input to Elastic Trace probe in a capture simulation and Trace CPU in a replay simulation""", default="") #Silent TCP Ports for non-interactive simulations parser.add_option("--disable-ports", action="store_true", default=False, help="Disable gdb/m5term ports.Usefull to run multiple "\ "batch simulations per compute-node") # Memory Options parser.add_option("--list-mem-types", action="callback", callback=_listMemTypes, help="List available memory types") parser.add_option("--mem-type", type="choice", default="DDR3_1600_x64", choices=MemConfig.mem_names(), help = "type of memory to use") parser.add_option("--mem-channels", type="int", default=1, help = "number of memory channels") parser.add_option("--mem-ranks", type="int", default=None, help = "number of memory ranks per channel") parser.add_option("--mem-size", action="store", type="string", default="512MB", help="Specify the physical memory size (single memory)") parser.add_option("-l", "--lpae", action="store_true") parser.add_option("-V", "--virtualisation", action="store_true") parser.add_option("--memchecker", action="store_true") # Cache Options parser.add_option("--external-memory-system", type="string", help="use external ports of this port_type for caches") parser.add_option("--tlm-memory", type="string", help="use external port for SystemC TLM cosimulation") parser.add_option("--caches", action="store_true") parser.add_option("--l2cache", action="store_true") parser.add_option("--l3cache", action="store_true") parser.add_option("--fastmem", action="store_true") parser.add_option("--num-dirs", type="int", default=1) parser.add_option("--num-l2caches", type="int", default=1) parser.add_option("--num-l3caches", type="int", default=1) parser.add_option("--l1d_size", type="string", default="64kB") parser.add_option("--l1d_assoc", type="int", default="2") parser.add_option("--l1d_hit_latency", type="int", default="2") parser.add_option("--l1d_response_latency", type="int", default="2") parser.add_option("--l1d_mshrs", type="int", default="4") parser.add_option("--l1d_tgts_per_mshr", type="int", default="20") parser.add_option("--l1i_size", type="string", default="32kB") parser.add_option("--l1i_assoc", type="int", default="2") parser.add_option("--l1i_hit_latency", type="int", default="2") parser.add_option("--l1i_response_latency", type="int", default="2") parser.add_option("--l1i_mshrs", type="int", default="4") parser.add_option("--l1i_tgts_per_mshr", type="int", default="20") parser.add_option("--l2_size", type="string", default="512kB") parser.add_option("--l2_assoc", type="int", default="8") parser.add_option("--l2_hit_latency", type="int", default="20") parser.add_option("--l2_response_latency", type="int", default="20") parser.add_option("--l2_mshrs", type="int", default="20") parser.add_option("--l2_tgts_per_mshr", type="int", default="12") parser.add_option("--l3_size", type="string", default="8MB") parser.add_option("--l3_assoc", type="int", default="16") parser.add_option("--l3_hit_latency", type="int", default="50") parser.add_option("--l3_response_latency", type="int", default="50") parser.add_option("--l3_mshrs", type="int", default="20") parser.add_option("--l3_tgts_per_mshr", type="int", default="16") parser.add_option("--cacheline_size", type="int", default=64) parser.add_option("--l1_replacement", type="string", default="lru") parser.add_option("--l1_prefetcher", type="string", default="none") parser.add_option("--l2_replacement", type="string", default="lru") parser.add_option("--l2_prefetcher", type="string", default="none") parser.add_option("--l3_replacement", type="string", default="lru") parser.add_option("--l3_prefetcher", type="string", default="none") #Core options parser.add_option("--cachePorts", type="int", default=200) parser.add_option("--decodeToFetchDelay", type="int", default=1) parser.add_option("--renameToFetchDelay", type="int", default=1) parser.add_option("--iewToFetchDelay", type="int", default=1) parser.add_option("--commitToFetchDelay", type="int", default=1) parser.add_option("--fetchWidth", type="int", default=4) parser.add_option("--renameToDecodeDelay", type="int", default=1) parser.add_option("--iewToDecodeDelay", type="int", default=1, help="Issue/Execute/Writeback to decode delay") parser.add_option("--commitToDecodeDelay", type="int", default=1) parser.add_option("--fetchToDecodeDelay", type="int", default=1) parser.add_option("--decodeWidth", type="int", default=4) parser.add_option("--iewToRenameDelay", type="int", default=1, help="Issue/Execute/Writeback to rename delay") parser.add_option("--commitToRenameDelay", type="int", default=1) parser.add_option("--decodeToRenameDelay", type="int", default=1) parser.add_option("--renameWidth", type="int", default=4) parser.add_option("--commitToIEWDelay", type="int", default=1,help="Commit to Issue/Execute/Writeback delay") parser.add_option("--renameToIEWDelay", type="int", default=2,help="Rename to Issue/Execute/Writeback delay") parser.add_option("--issueToExecuteDelay", type="int", default=1, help="Issue to execute delay (internal to the IEW stage)") parser.add_option("--dispatchWidth", type="int", default=4) parser.add_option("--issueWidth", type="int", default=4) parser.add_option("--wbWidth", type="int", default=4) parser.add_option("--iewToCommitDelay", type="int", default=1, help="Issue/Execute/Writeback to commit delay") parser.add_option("--renameToROBDelay", type="int", default=1, help="Rename to reorder buffer delay") parser.add_option("--commitWidth", type="int", default=4) parser.add_option("--squashWidth", type="int", default=4) parser.add_option("--trapLatency", type="int", default=4) parser.add_option("--fetchTrapLatency", type="int", default=1) parser.add_option("--backComSize", type="int", default=5, help="Time buffer size for backwards communication") parser.add_option("--forwardComSize", type="int", default=5, help="Time buffer size for forward communication") parser.add_option("--LQEntries", type="int", default=32) parser.add_option("--SQEntries", type="int", default=32) parser.add_option("--LSQDepCheckShift", type="int", default=4, help="Number of places to shift addr before check") parser.add_option("--LSQCheckLoads", type="string", default="True", help="Should dependency violations be checked for loads & stores or just stores") parser.add_option("--store_set_clear_period", type="int", default=250000, help="Number of load/store insts before the dep predictor should be invalidated") parser.add_option("--LFSTSize", type="int", default=1024, help="Last fetched store table size") parser.add_option("--SSITSize", type="int", default=1024, help="Store set ID table size") parser.add_option("--numRobs", type="int", default=1) parser.add_option("--numPhysIntRegs", type="int", default=256) parser.add_option("--numPhysFloatRegs", type="int", default=256) parser.add_option("--numIQEntries", type="int", default=64) parser.add_option("--numROBEntries", type="int", default=192) parser.add_option("--smtNumFetchingThreads", type="int", default=1) parser.add_option("--smtFetchPolicy", type="string", default="singlethread",help="SMT Fetch policy. Values (not case-sensitive): singlethread, roundrobin, branch, iqcount or lsqcount") parser.add_option("--smtLSQPolicy", type="string", default="ldssqcount",help="SMT LSQ Sharing Policy. Values (not case-sensitive): dynamic, partitioned or threshold") parser.add_option("--smtLSQThreshold", type="int", default=100) parser.add_option("--smtIQPolicy", type="string", default="ldssqcount",help="SMT IQ Sharing Policy. Values (not case-sensitive): dynamic, partitioned or threshold") parser.add_option("--smtIQThreshold", type="int", default=100) parser.add_option("--smtROBPolicy", type="string", default="ldssqcount",help="SMT ROB Sharing Policy. Values (not case-sensitive): dynamic, partitioned or threshold") parser.add_option("--smtROBThreshold", type="int", default=100) parser.add_option("--smtCommitPolicy", type="string", default="ldssqcount",help="SMT Commit Policy. Values (not case-sensitive): aggressive, roundrobin or oldestready") #Branch predictor options parser.add_option("--BTBEntries", type="int", default=4096) parser.add_option("--BTBTagSize", type="int", default=16) parser.add_option("--RASSize", type="int", default=16) parser.add_option("--instShiftAmt", type="int", default=2) # dist-gem5 options parser.add_option("--dist", action="store_true", help="Parallel distributed gem5 simulation.") parser.add_option("--is-switch", action="store_true", help="Select the network switch simulator process for a"\ "distributed gem5 run") parser.add_option("--dist-rank", default=0, action="store", type="int", help="Rank of this system within the dist gem5 run.") parser.add_option("--dist-size", default=0, action="store", type="int", help="Number of gem5 processes within the dist gem5 run.") parser.add_option("--dist-server-name", default="127.0.0.1", action="store", type="string", help="Name of the message server host\nDEFAULT: localhost") parser.add_option("--dist-server-port", default=2200, action="store", type="int", help="Message server listen port\nDEFAULT: 2200") parser.add_option("--dist-sync-repeat", default="0us", action="store", type="string", help="Repeat interval for synchronisation barriers among dist-gem5 processes\nDEFAULT: --ethernet-linkdelay") parser.add_option("--dist-sync-start", default="5200000000000t", action="store", type="string", help="Time to schedule the first dist synchronisation barrier\nDEFAULT:5200000000000t") parser.add_option("--ethernet-linkspeed", default="10Gbps", action="store", type="string", help="Link speed in bps\nDEFAULT: 10Gbps") parser.add_option("--ethernet-linkdelay", default="10us", action="store", type="string", help="Link delay in seconds\nDEFAULT: 10us") # Enable Ruby parser.add_option("--ruby", action="store_true") # Run duration options parser.add_option("-m", "--abs-max-tick", type="int", default=m5.MaxTick, metavar="TICKS", help="Run to absolute simulated tick " \ "specified including ticks from a restored checkpoint") parser.add_option("--rel-max-tick", type="int", default=None, metavar="TICKS", help="Simulate for specified number of" \ " ticks relative to the simulation start tick (e.g. if " \ "restoring a checkpoint)") parser.add_option("--maxtime", type="float", default=None, help="Run to the specified absolute simulated time in " \ "seconds") parser.add_option("-I", "--maxinsts", action="store", type="int", default=None, help="""Total number of instructions to simulate (default: run forever)""") parser.add_option("--work-item-id", action="store", type="int", help="the specific work id for exit & checkpointing") parser.add_option("--num-work-ids", action="store", type="int", help="Number of distinct work item types") parser.add_option("--work-begin-cpu-id-exit", action="store", type="int", help="exit when work starts on the specified cpu") parser.add_option("--work-end-exit-count", action="store", type="int", help="exit at specified work end count") parser.add_option("--work-begin-exit-count", action="store", type="int", help="exit at specified work begin count") parser.add_option("--init-param", action="store", type="int", default=0, help="""Parameter available in simulation with m5 initparam""") parser.add_option("--initialize-only", action="store_true", default=False, help="""Exit after initialization. Do not simulate time. Useful when gem5 is run as a library.""") # Simpoint options parser.add_option("--simpoint-profile", action="store_true", help="Enable basic block profiling for SimPoints") parser.add_option("--simpoint-interval", type="int", default=10000000, help="SimPoint interval in num of instructions") parser.add_option("--take-simpoint-checkpoints", action="store", type="string", help="<simpoint file,weight file,interval-length,warmup-length>") parser.add_option("--restore-simpoint-checkpoint", action="store_true", help="restore from a simpoint checkpoint taken with " + "--take-simpoint-checkpoints") # Checkpointing options ###Note that performing checkpointing via python script files will override ###checkpoint instructions built into binaries. parser.add_option("--take-checkpoints", action="store", type="string", help="<M,N> take checkpoints at tick M and every N ticks thereafter") parser.add_option("--max-checkpoints", action="store", type="int", help="the maximum number of checkpoints to drop", default=5) parser.add_option("--checkpoint-dir", action="store", type="string", help="Place all checkpoints in this absolute directory") parser.add_option("-r", "--checkpoint-restore", action="store", type="int", help="restore from checkpoint <N>") parser.add_option("--checkpoint-at-end", action="store_true", help="take a checkpoint at end of run") parser.add_option("--work-begin-checkpoint-count", action="store", type="int", help="checkpoint at specified work begin count") parser.add_option("--work-end-checkpoint-count", action="store", type="int", help="checkpoint at specified work end count") parser.add_option("--work-cpus-checkpoint-count", action="store", type="int", help="checkpoint and exit when active cpu count is reached") parser.add_option("--restore-with-cpu", action="store", type="choice", default="timing", choices=CpuConfig.cpu_names(), help = "cpu type for restoring from a checkpoint") # CPU Switching - default switch model goes from a checkpoint # to a timing simple CPU with caches to warm up, then to detailed CPU for # data measurement parser.add_option("--repeat-switch", action="store", type="int", default=None, help="switch back and forth between CPUs with period <N>") parser.add_option("-s", "--standard-switch", action="store", type="int", default=None, help="switch from timing to Detailed CPU after warmup period of <N>") parser.add_option("-p", "--prog-interval", type="str", help="CPU Progress Interval") # Fastforwarding and simpoint related materials parser.add_option("-W", "--warmup-insts", action="store", type="int", default=None, help="Warmup period in total instructions (requires --standard-switch)") parser.add_option("--bench", action="store", type="string", default=None, help="base names for --take-checkpoint and --checkpoint-restore") parser.add_option("-F", "--fast-forward", action="store", type="string", default=None, help="Number of instructions to fast forward before switching") parser.add_option("-S", "--simpoint", action="store_true", default=False, help="""Use workload simpoints as an instruction offset for --checkpoint-restore or --take-checkpoint.""") parser.add_option("--at-instruction", action="store_true", default=False, help="""Treat value of --checkpoint-restore or --take-checkpoint as a number of instructions.""") parser.add_option("--spec-input", default="ref", type="choice", choices=["ref", "test", "train", "smred", "mdred", "lgred"], help="Input set size for SPEC CPU2000 benchmarks.") parser.add_option("--arm-iset", default="arm", type="choice", choices=["arm", "thumb", "aarch64"], help="ARM instruction set.") #begin ATC CODE (prietop) #Added the option to modify the random seed of the execution. parser.add_option("--random_seed", action="store", type="int", default=None, help="Used for seeding the random number generator")
import google.protobuf except: print "Please install the Python protobuf module" exit(-1) import packet_pb2 else: print "Failed to import packet proto definitions" exit(-1) parser = optparse.OptionParser() parser.add_option("--mem-type", type="choice", default="DDR3_1600_8x8", choices=MemConfig.mem_names(), help="type of memory to use") parser.add_option("--mem-size", action="store", type="string", default="16MB", help="Specify the memory size") parser.add_option("--reuse-trace", action="store_true", help="Prevent generation of traces and reuse existing") (options, args) = parser.parse_args() if args: print "Error: script doesn't take any positional arguments" sys.exit(1)
def addCommonOptions(parser): #Network options parser.add_option("--mac", type="string", default="00:90:00:00:00:01", help="MAC Address") parser.add_option("--sync", type="long", default=0) parser.add_option("--eth", action="store_true") parser.add_option("--switch", action="store_true") parser.add_option("--sync-port", type="int", default=5005) parser.add_option("--sync-host", type="string", default="10.0.0.1") parser.add_option("--num-nodes", type="int", default=1) parser.add_option("--cpt-period", type="int", default=0) parser.add_option("--warmup-period", type="int", default=0) parser.add_option("--zero", type="int", default=0) parser.add_option("--link-delay", type="string", default='0us') parser.add_option("--switch-link-delay", type="string", default='0us') parser.add_option("--link-delay-var", type="string", default='0us') parser.add_option("--link-speed", type="string", default='1Gbps') parser.add_option("--zero-delay-switch", type="string", default='False') parser.add_option("--link-delay-opt", type="string", default='0us', help="link delay for small packets") parser.add_option("--link-delay-queue", type="string", default='0us', help="link delay for packet smaller than queuing point!") parser.add_option("--link-retry-time", type="string", default='0us', help="minimum delay between two scheduled packets") parser.add_option("--link-rate-scale", type="float", default=1.0) parser.add_option("--tcp-speed", type="string", default='1Gbps') parser.add_option("--tcp-retry-speed", type="string", default='1Gbps') parser.add_option("--udp-retry-speed", type="string", default='1Gbps') parser.add_option("--no-ip-retry-speed", type="string", default='1Gbps') parser.add_option("--udp-speed", type="string", default='1Gbps') parser.add_option("--no-ip-speed", type="string", default='1Gbps') parser.add_option("--tcp-process-speed", type="string", default='1Gbps') parser.add_option("--nic-queue-th", type="string", default='1s') parser.add_option("--tap-port", type="int", default=3500) parser.add_option("--tap-master", type="int", default=1) parser.add_option("--tcp-jmp-size0", type="int", default=131) parser.add_option("--tcp-jmp-size1", type="int", default=323) parser.add_option("--tcp-jmp-delay0", type="string", default='0us') parser.add_option("--tcp-jmp-delay1", type="string", default='0us') parser.add_option("--server", type="string", default='True') parser.add_option("--tap-first-delay", type="string", default='1ms') parser.add_option( "--nic-rate-th-freq", type="long", default=50) # threshold for nic awaqre dvfs governor (Mbps) parser.add_option("--nic-rate-cal-interval", type="string", default='100us') #for rate calc parser.add_option("--enable-rate-calc", type="string", default='False' ) #enable or disable rate calc, by default it's disabled parser.add_option("--queue-size", type="int", default=200) parser.add_option("--disable-freq-change-interval", type="string", default='5ms') parser.add_option("--nic-rate-th-low-freq", type="long", default=10) # low threshold for nic governor (Mbps) parser.add_option( "--nic-rate-th-low-cnt", type="int", default=5 ) # how many times to see arrival rate above low threshold before # system options parser.add_option("--list-cpu-types", action="callback", callback=_listCpuTypes, help="List available CPU types") parser.add_option("--cpu-type", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help="type of cpu to run with") parser.add_option("--checker", action="store_true") parser.add_option("-n", "--num-cpus", type="int", default=1) parser.add_option("--sys-voltage", action="store", type="string", default='1.0V', help="""Top-level voltage for blocks running at system power supply""") parser.add_option("--sys-clock", action="store", type="string", default='1GHz', help="""Top-level clock for blocks running at system speed""") parser.add_option("--cpu-clock", action="store", type="string", default='2GHz', help="Clock for blocks running at CPU speed") parser.add_option("--smt", action="store_true", default=False, help=""" Only used if multiple programs are specified. If true, then the number of threads per cpu is same as the number of programs.""") # Memory Options parser.add_option("--list-mem-types", action="callback", callback=_listMemTypes, help="List available memory types") parser.add_option("--mem-type", type="choice", default="ddr3_1600_x64", choices=MemConfig.mem_names(), help="type of memory to use") parser.add_option("--mem-channels", type="int", default=1, help="number of memory channels") parser.add_option("--mem-ranks", type="int", default=None, help="number of memory ranks per channel") parser.add_option("--mem-size", action="store", type="string", default="512MB", help="Specify the physical memory size (single memory)") parser.add_option("-l", "--lpae", action="store_true") parser.add_option("-V", "--virtualisation", action="store_true") parser.add_option("--memchecker", action="store_true") # Cache Options parser.add_option("--caches", action="store_true") parser.add_option("--l2cache", action="store_true") parser.add_option("--fastmem", action="store_true") parser.add_option("--num-dirs", type="int", default=1) parser.add_option("--num-l2caches", type="int", default=1) parser.add_option("--num-l3caches", type="int", default=1) parser.add_option("--l1d_size", type="string", default="64kB") parser.add_option("--l1i_size", type="string", default="32kB") parser.add_option("--l2_size", type="string", default="2MB") parser.add_option("--l3_size", type="string", default="16MB") parser.add_option("--l1d_assoc", type="int", default=2) parser.add_option("--l1i_assoc", type="int", default=2) parser.add_option("--l2_assoc", type="int", default=8) parser.add_option("--l3_assoc", type="int", default=16) parser.add_option("--cacheline_size", type="int", default=64) # Enable Ruby parser.add_option("--ruby", action="store_true") # Run duration options parser.add_option("-m", "--abs-max-tick", type="int", default=m5.MaxTick, metavar="TICKS", help="Run to absolute simulated tick " \ "specified including ticks from a restored checkpoint") parser.add_option("--rel-max-tick", type="int", default=None, metavar="TICKS", help="Simulate for specified number of" \ " ticks relative to the simulation start tick (e.g. if " \ "restoring a checkpoint)") parser.add_option("--maxtime", type="float", default=None, help="Run to the specified absolute simulated time in " \ "seconds") parser.add_option("-I", "--maxinsts", action="store", type="int", default=None, help="""Total number of instructions to simulate (default: run forever)""") parser.add_option("--work-item-id", action="store", type="int", help="the specific work id for exit & checkpointing") parser.add_option("--num-work-ids", action="store", type="int", help="Number of distinct work item types") parser.add_option("--work-begin-cpu-id-exit", action="store", type="int", help="exit when work starts on the specified cpu") parser.add_option("--work-end-exit-count", action="store", type="int", help="exit at specified work end count") parser.add_option("--work-begin-exit-count", action="store", type="int", help="exit at specified work begin count") parser.add_option("--init-param", action="store", type="int", default=0, help="""Parameter available in simulation with m5 initparam""") # Simpoint options parser.add_option("--simpoint-profile", action="store_true", help="Enable basic block profiling for SimPoints") parser.add_option("--simpoint-interval", type="int", default=10000000, help="SimPoint interval in num of instructions") parser.add_option( "--take-simpoint-checkpoints", action="store", type="string", help="<simpoint file,weight file,interval-length,warmup-length>") parser.add_option("--restore-simpoint-checkpoint", action="store_true", help="restore from a simpoint checkpoint taken with " + "--take-simpoint-checkpoints") # Checkpointing options ###Note that performing checkpointing via python script files will override ###checkpoint instructions built into binaries. parser.add_option( "--take-checkpoints", action="store", type="string", help="<M,N> take checkpoints at tick M and every N ticks thereafter") parser.add_option("--max-checkpoints", action="store", type="int", help="the maximum number of checkpoints to drop", default=5) parser.add_option("--checkpoint-dir", action="store", type="string", help="Place all checkpoints in this absolute directory") parser.add_option("-r", "--checkpoint-restore", action="store", type="int", help="restore from checkpoint <N>") parser.add_option("--checkpoint-at-end", action="store_true", help="take a checkpoint at end of run") parser.add_option("--work-begin-checkpoint-count", action="store", type="int", help="checkpoint at specified work begin count") parser.add_option("--work-end-checkpoint-count", action="store", type="int", help="checkpoint at specified work end count") parser.add_option( "--work-cpus-checkpoint-count", action="store", type="int", help="checkpoint and exit when active cpu count is reached") parser.add_option("--restore-with-cpu", action="store", type="choice", default="atomic", choices=CpuConfig.cpu_names(), help="cpu type for restoring from a checkpoint") # CPU Switching - default switch model goes from a checkpoint # to a timing simple CPU with caches to warm up, then to detailed CPU for # data measurement parser.add_option( "--repeat-switch", action="store", type="int", default=None, help="switch back and forth between CPUs with period <N>") parser.add_option( "-s", "--standard-switch", action="store", type="int", default=None, help="switch from timing to Detailed CPU after warmup period of <N>") parser.add_option("-p", "--prog-interval", type="str", help="CPU Progress Interval") # Fastforwarding and simpoint related materials parser.add_option( "-W", "--warmup-insts", action="store", type="int", default=None, help="Warmup period in total instructions (requires --standard-switch)" ) parser.add_option( "--bench", action="store", type="string", default=None, help="base names for --take-checkpoint and --checkpoint-restore") parser.add_option( "-F", "--fast-forward", action="store", type="string", default=None, help="Number of instructions to fast forward before switching") parser.add_option( "-S", "--simpoint", action="store_true", default=False, help="""Use workload simpoints as an instruction offset for --checkpoint-restore or --take-checkpoint.""") parser.add_option( "--at-instruction", action="store_true", default=False, help="""Treat value of --checkpoint-restore or --take-checkpoint as a number of instructions.""") parser.add_option( "--spec-input", default="ref", type="choice", choices=["ref", "test", "train", "smred", "mdred", "lgred"], help="Input set size for SPEC CPU2000 benchmarks.") parser.add_option("--arm-iset", default="arm", type="choice", choices=["arm", "thumb", "aarch64"], help="ARM instruction set.")