48 parser.add_option("--checker", action="store_true"); 49 parser.add_option("-n", "--num-cpus", type="int", default=1) 50 parser.add_option("--caches", action="store_true") 51 parser.add_option("--l2cache", action="store_true") 52 parser.add_option("--fastmem", action="store_true") 53 parser.add_option("--simpoint-profile", action="store_true", 54 help="Enable basic block profiling for SimPoints") 55 parser.add_option("--simpoint-interval", type="int", default=10000000, 56 help="SimPoint interval in num of instructions") 57 parser.add_option("--clock", action="store", type="string", default='2GHz') 58 parser.add_option("--num-dirs", type="int", default=1) 59 parser.add_option("--num-l2caches", type="int", default=1) 60 parser.add_option("--num-l3caches", type="int", default=1) 61 parser.add_option("--l1d_size", type="string", default="64kB") 62 parser.add_option("--l1i_size", type="string", default="32kB") 63 parser.add_option("--l2_size", type="string", default="2MB") 64 parser.add_option("--l3_size", type="string", default="16MB") 65 parser.add_option("--l1d_assoc", type="int", default=2) 66 parser.add_option("--l1i_assoc", type="int", default=2) 67 parser.add_option("--l2_assoc", type="int", default=8) 68 parser.add_option("--l3_assoc", type="int", default=16) 69 parser.add_option("--cacheline_size", type="int", default=64) 70 parser.add_option("--ruby", action="store_true") 71 parser.add_option("--smt", action="store_true", default=False, 72 help = """ 73 Only used if multiple programs are specified. If true, 74 then the number of threads per cpu is same as the 75 number of programs.""") 76 77 # Run duration options 78 parser.add_option("-m", "--maxtick", type="int", default=m5.MaxTick, 79 metavar="T", help="Stop after T ticks") 80 parser.add_option("--maxtime", type="float") 81 parser.add_option("-I", "--maxinsts", action="store", type="int", 82 default=None, help="""Total number of instructions to 83 simulate (default: run forever)""") 84 parser.add_option("--work-item-id", action="store", type="int", 85 help="the specific work id for exit & checkpointing") 86 parser.add_option("--work-begin-cpu-id-exit", action="store", type="int", 87 help="exit when work starts on the specified cpu") 88 parser.add_option("--work-end-exit-count", action="store", type="int", 89 help="exit at specified work end count") 90 parser.add_option("--work-begin-exit-count", action="store", type="int", 91 help="exit at specified work begin count") 92 parser.add_option("--init-param", action="store", type="int", default=0, 93 help="""Parameter available in simulation with m5 94 initparam""") 95 96 # Checkpointing options 97 ###Note that performing checkpointing via python script files will override 98 ###checkpoint instructions built into binaries. 99 parser.add_option("--take-checkpoints", action="store", type="string", 100 help="<M,N> take checkpoints at tick M and every N ticks thereafter") 101 parser.add_option("--max-checkpoints", action="store", type="int", 102 help="the maximum number of checkpoints to drop", default=5) 103 parser.add_option("--checkpoint-dir", action="store", type="string", 104 help="Place all checkpoints in this absolute directory") 105 parser.add_option("-r", "--checkpoint-restore", action="store", type="int", 106 help="restore from checkpoint <N>") 107 parser.add_option("--checkpoint-at-end", action="store_true", 108 help="take a checkpoint at end of run") 109 parser.add_option("--work-begin-checkpoint-count", action="store", type="int", 110 help="checkpoint at specified work begin count") 111 parser.add_option("--work-end-checkpoint-count", action="store", type="int", 112 help="checkpoint at specified work end count") 113 parser.add_option("--work-cpus-checkpoint-count", action="store", type="int", 114 help="checkpoint and exit when active cpu count is reached") 115 parser.add_option("--restore-with-cpu", action="store", type="choice", 116 default="atomic", choices = ["atomic", "timing", 117 "detailed", "inorder"], 118 help = "cpu type for restoring from a checkpoint") 119 120 121 # CPU Switching - default switch model goes from a checkpoint 122 # to a timing simple CPU with caches to warm up, then to detailed CPU for 123 # data measurement 124 parser.add_option("--repeat-switch", action="store", type="int", 125 default=None, 126 help="switch back and forth between CPUs with period <N>") 127 parser.add_option("-s", "--standard-switch", action="store", type="int", 128 default=None, 129 help="switch from timing to Detailed CPU after warmup period of <N>") 130 parser.add_option("-p", "--prog-interval", type="str", 131 help="CPU Progress Interval") 132 133 # Fastforwarding and simpoint related materials 134 parser.add_option("-W", "--warmup-insts", action="store", type="int", 135 default=None, 136 help="Warmup period in total instructions (requires --standard-switch)") 137 parser.add_option("--bench", action="store", type="string", default=None, 138 help="base names for --take-checkpoint and --checkpoint-restore") 139 parser.add_option("-F", "--fast-forward", action="store", type="string", 140 default=None, 141 help="Number of instructions to fast forward before switching") 142 parser.add_option("-S", "--simpoint", action="store_true", default=False, 143 help="""Use workload simpoints as an instruction offset for 144 --checkpoint-restore or --take-checkpoint.""") 145 parser.add_option("--at-instruction", action="store_true", default=False, 146 help="""Treat value of --checkpoint-restore or --take-checkpoint as a 147 number of instructions.""") 148 149def addSEOptions(parser): 150 # Benchmark options 151 parser.add_option("-c", "--cmd", default="", 152 help="The binary to run in syscall emulation mode.") 153 parser.add_option("-o", "--options", default="", 154 help="""The options to pass to the binary, use " " 155 around the entire string""") 156 parser.add_option("-i", "--input", default="", 157 help="Read stdin from a file.") 158 parser.add_option("--output", default="", 159 help="Redirect stdout to a file.") 160 parser.add_option("--errout", default="", 161 help="Redirect stderr to a file.") 162 163def addFSOptions(parser): 164 # Simulation options 165 parser.add_option("--timesync", action="store_true", 166 help="Prevent simulated time from getting ahead of real time") 167 168 # System options 169 parser.add_option("--kernel", action="store", type="string") 170 parser.add_option("--script", action="store", type="string") 171 parser.add_option("--frame-capture", action="store_true", 172 help="Stores changed frame buffers from the VNC server to compressed "\ 173 "files in the gem5 output directory") 174 175 if buildEnv['TARGET_ISA'] == "arm": 176 parser.add_option("--bare-metal", action="store_true", 177 help="Provide the raw system without the linux specific bits") 178 parser.add_option("--machine-type", action="store", type="choice", 179 choices=ArmMachineType.map.keys(), default="RealView_PBX") 180 parser.add_option("--dtb-filename", action="store", type="string", 181 help="Specifies device tree blob file to use with device-tree-"\ 182 "enabled kernels") 183 # Benchmark options 184 parser.add_option("--dual", action="store_true", 185 help="Simulate two systems attached with an ethernet link") 186 parser.add_option("-b", "--benchmark", action="store", type="string", 187 dest="benchmark", 188 help="Specify the benchmark to run. Available benchmarks: %s"\ 189 % DefinedBenchmarks) 190 191 # Metafile options 192 parser.add_option("--etherdump", action="store", type="string", dest="etherdump", 193 help="Specify the filename to dump a pcap capture of the" \ 194 "ethernet traffic") 195 196 # Disk Image Options 197 parser.add_option("--disk-image", action="store", type="string", default=None, 198 help="Path to the disk image to use.") 199 200 # Memory Size Options 201 parser.add_option("--mem-size", action="store", type="string", default=None, 202 help="Specify the physical memory size (single memory)")
| 71 parser.add_option("--checker", action="store_true"); 72 parser.add_option("-n", "--num-cpus", type="int", default=1) 73 parser.add_option("--caches", action="store_true") 74 parser.add_option("--l2cache", action="store_true") 75 parser.add_option("--fastmem", action="store_true") 76 parser.add_option("--simpoint-profile", action="store_true", 77 help="Enable basic block profiling for SimPoints") 78 parser.add_option("--simpoint-interval", type="int", default=10000000, 79 help="SimPoint interval in num of instructions") 80 parser.add_option("--clock", action="store", type="string", default='2GHz') 81 parser.add_option("--num-dirs", type="int", default=1) 82 parser.add_option("--num-l2caches", type="int", default=1) 83 parser.add_option("--num-l3caches", type="int", default=1) 84 parser.add_option("--l1d_size", type="string", default="64kB") 85 parser.add_option("--l1i_size", type="string", default="32kB") 86 parser.add_option("--l2_size", type="string", default="2MB") 87 parser.add_option("--l3_size", type="string", default="16MB") 88 parser.add_option("--l1d_assoc", type="int", default=2) 89 parser.add_option("--l1i_assoc", type="int", default=2) 90 parser.add_option("--l2_assoc", type="int", default=8) 91 parser.add_option("--l3_assoc", type="int", default=16) 92 parser.add_option("--cacheline_size", type="int", default=64) 93 parser.add_option("--ruby", action="store_true") 94 parser.add_option("--smt", action="store_true", default=False, 95 help = """ 96 Only used if multiple programs are specified. If true, 97 then the number of threads per cpu is same as the 98 number of programs.""") 99 100 # Run duration options 101 parser.add_option("-m", "--maxtick", type="int", default=m5.MaxTick, 102 metavar="T", help="Stop after T ticks") 103 parser.add_option("--maxtime", type="float") 104 parser.add_option("-I", "--maxinsts", action="store", type="int", 105 default=None, help="""Total number of instructions to 106 simulate (default: run forever)""") 107 parser.add_option("--work-item-id", action="store", type="int", 108 help="the specific work id for exit & checkpointing") 109 parser.add_option("--work-begin-cpu-id-exit", action="store", type="int", 110 help="exit when work starts on the specified cpu") 111 parser.add_option("--work-end-exit-count", action="store", type="int", 112 help="exit at specified work end count") 113 parser.add_option("--work-begin-exit-count", action="store", type="int", 114 help="exit at specified work begin count") 115 parser.add_option("--init-param", action="store", type="int", default=0, 116 help="""Parameter available in simulation with m5 117 initparam""") 118 119 # Checkpointing options 120 ###Note that performing checkpointing via python script files will override 121 ###checkpoint instructions built into binaries. 122 parser.add_option("--take-checkpoints", action="store", type="string", 123 help="<M,N> take checkpoints at tick M and every N ticks thereafter") 124 parser.add_option("--max-checkpoints", action="store", type="int", 125 help="the maximum number of checkpoints to drop", default=5) 126 parser.add_option("--checkpoint-dir", action="store", type="string", 127 help="Place all checkpoints in this absolute directory") 128 parser.add_option("-r", "--checkpoint-restore", action="store", type="int", 129 help="restore from checkpoint <N>") 130 parser.add_option("--checkpoint-at-end", action="store_true", 131 help="take a checkpoint at end of run") 132 parser.add_option("--work-begin-checkpoint-count", action="store", type="int", 133 help="checkpoint at specified work begin count") 134 parser.add_option("--work-end-checkpoint-count", action="store", type="int", 135 help="checkpoint at specified work end count") 136 parser.add_option("--work-cpus-checkpoint-count", action="store", type="int", 137 help="checkpoint and exit when active cpu count is reached") 138 parser.add_option("--restore-with-cpu", action="store", type="choice", 139 default="atomic", choices = ["atomic", "timing", 140 "detailed", "inorder"], 141 help = "cpu type for restoring from a checkpoint") 142 143 144 # CPU Switching - default switch model goes from a checkpoint 145 # to a timing simple CPU with caches to warm up, then to detailed CPU for 146 # data measurement 147 parser.add_option("--repeat-switch", action="store", type="int", 148 default=None, 149 help="switch back and forth between CPUs with period <N>") 150 parser.add_option("-s", "--standard-switch", action="store", type="int", 151 default=None, 152 help="switch from timing to Detailed CPU after warmup period of <N>") 153 parser.add_option("-p", "--prog-interval", type="str", 154 help="CPU Progress Interval") 155 156 # Fastforwarding and simpoint related materials 157 parser.add_option("-W", "--warmup-insts", action="store", type="int", 158 default=None, 159 help="Warmup period in total instructions (requires --standard-switch)") 160 parser.add_option("--bench", action="store", type="string", default=None, 161 help="base names for --take-checkpoint and --checkpoint-restore") 162 parser.add_option("-F", "--fast-forward", action="store", type="string", 163 default=None, 164 help="Number of instructions to fast forward before switching") 165 parser.add_option("-S", "--simpoint", action="store_true", default=False, 166 help="""Use workload simpoints as an instruction offset for 167 --checkpoint-restore or --take-checkpoint.""") 168 parser.add_option("--at-instruction", action="store_true", default=False, 169 help="""Treat value of --checkpoint-restore or --take-checkpoint as a 170 number of instructions.""") 171 172def addSEOptions(parser): 173 # Benchmark options 174 parser.add_option("-c", "--cmd", default="", 175 help="The binary to run in syscall emulation mode.") 176 parser.add_option("-o", "--options", default="", 177 help="""The options to pass to the binary, use " " 178 around the entire string""") 179 parser.add_option("-i", "--input", default="", 180 help="Read stdin from a file.") 181 parser.add_option("--output", default="", 182 help="Redirect stdout to a file.") 183 parser.add_option("--errout", default="", 184 help="Redirect stderr to a file.") 185 186def addFSOptions(parser): 187 # Simulation options 188 parser.add_option("--timesync", action="store_true", 189 help="Prevent simulated time from getting ahead of real time") 190 191 # System options 192 parser.add_option("--kernel", action="store", type="string") 193 parser.add_option("--script", action="store", type="string") 194 parser.add_option("--frame-capture", action="store_true", 195 help="Stores changed frame buffers from the VNC server to compressed "\ 196 "files in the gem5 output directory") 197 198 if buildEnv['TARGET_ISA'] == "arm": 199 parser.add_option("--bare-metal", action="store_true", 200 help="Provide the raw system without the linux specific bits") 201 parser.add_option("--machine-type", action="store", type="choice", 202 choices=ArmMachineType.map.keys(), default="RealView_PBX") 203 parser.add_option("--dtb-filename", action="store", type="string", 204 help="Specifies device tree blob file to use with device-tree-"\ 205 "enabled kernels") 206 # Benchmark options 207 parser.add_option("--dual", action="store_true", 208 help="Simulate two systems attached with an ethernet link") 209 parser.add_option("-b", "--benchmark", action="store", type="string", 210 dest="benchmark", 211 help="Specify the benchmark to run. Available benchmarks: %s"\ 212 % DefinedBenchmarks) 213 214 # Metafile options 215 parser.add_option("--etherdump", action="store", type="string", dest="etherdump", 216 help="Specify the filename to dump a pcap capture of the" \ 217 "ethernet traffic") 218 219 # Disk Image Options 220 parser.add_option("--disk-image", action="store", type="string", default=None, 221 help="Path to the disk image to use.") 222 223 # Memory Size Options 224 parser.add_option("--mem-size", action="store", type="string", default=None, 225 help="Specify the physical memory size (single memory)")
|