Deleted Added
sdiff udiff text old ( 11626:c89c72b0e5f5 ) new ( 11688:725fef71f376 )
full compact
1# Copyright (c) 2013 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 27 unchanged lines hidden (view full) ---

36# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38#
39# Authors: Lisa Hsu
40
41import m5
42from m5.defines import buildEnv
43from m5.objects import *
44from Benchmarks import *
45
46import CpuConfig
47import MemConfig
48import PlatformConfig
49
50from FSConfig import os_types
51
52def _listCpuTypes(option, opt, value, parser):
53 CpuConfig.print_cpu_list()
54 sys.exit(0)
55
56def _listMemTypes(option, opt, value, parser):
57 MemConfig.print_mem_list()
58 sys.exit(0)
59
60def _listPlatformTypes(option, opt, value, parser):
61 PlatformConfig.print_platform_list()
62 sys.exit(0)
63
64def addCommonOptions(parser):
65 # system options
66 parser.add_option("--list-cpu-types",
67 action="callback", callback=_listCpuTypes,
68 help="List available CPU types")
69 parser.add_option("--cpu-type", type="choice", default="atomic",
70 choices=CpuConfig.cpu_names(),
71 help = "type of cpu to run with")
72 parser.add_option("--checker", action="store_true");
73 parser.add_option("-n", "--num-cpus", type="int", default=1)
74 parser.add_option("--sys-voltage", action="store", type="string",
75 default='1.0V',
76 help = """Top-level voltage for blocks running at system
77 power supply""")
78 parser.add_option("--sys-clock", action="store", type="string",
79 default='1GHz',
80 help = """Top-level clock for blocks running at system
81 speed""")
82 parser.add_option("--cpu-clock", action="store", type="string",
83 default='2GHz',
84 help="Clock for blocks running at CPU speed")
85 parser.add_option("--smt", action="store_true", default=False,
86 help = """
87 Only used if multiple programs are specified. If true,
88 then the number of threads per cpu is same as the
89 number of programs.""")
90 parser.add_option("--elastic-trace-en", action="store_true",
91 help="""Enable capture of data dependency and instruction
92 fetch traces using elastic trace probe.""")
93 # Trace file paths input to trace probe in a capture simulation and input
94 # to Trace CPU in a replay simulation
95 parser.add_option("--inst-trace-file", action="store", type="string",
96 help="""Instruction fetch trace file input to
97 Elastic Trace probe in a capture simulation and
98 Trace CPU in a replay simulation""", default="")
99 parser.add_option("--data-trace-file", action="store", type="string",
100 help="""Data dependency trace file input to
101 Elastic Trace probe in a capture simulation and
102 Trace CPU in a replay simulation""", default="")
103
104 # Memory Options
105 parser.add_option("--list-mem-types",
106 action="callback", callback=_listMemTypes,
107 help="List available memory types")
108 parser.add_option("--mem-type", type="choice", default="DDR3_1600_x64",
109 choices=MemConfig.mem_names(),
110 help = "type of memory to use")
111 parser.add_option("--mem-channels", type="int", default=1,
112 help = "number of memory channels")
113 parser.add_option("--mem-ranks", type="int", default=None,
114 help = "number of memory ranks per channel")
115 parser.add_option("--mem-size", action="store", type="string",
116 default="512MB",
117 help="Specify the physical memory size (single memory)")
118
119 parser.add_option("-l", "--lpae", action="store_true")
120 parser.add_option("-V", "--virtualisation", action="store_true")
121
122 parser.add_option("--memchecker", action="store_true")
123
124 # Cache Options
125 parser.add_option("--external-memory-system", type="string",
126 help="use external ports of this port_type for caches")
127 parser.add_option("--tlm-memory", type="string",
128 help="use external port for SystemC TLM cosimulation")
129 parser.add_option("--caches", action="store_true")
130 parser.add_option("--l2cache", action="store_true")
131 parser.add_option("--fastmem", action="store_true")
132 parser.add_option("--num-dirs", type="int", default=1)
133 parser.add_option("--num-l2caches", type="int", default=1)
134 parser.add_option("--num-l3caches", type="int", default=1)
135 parser.add_option("--l1d_size", type="string", default="64kB")
136 parser.add_option("--l1i_size", type="string", default="32kB")
137 parser.add_option("--l2_size", type="string", default="2MB")
138 parser.add_option("--l3_size", type="string", default="16MB")
139 parser.add_option("--l1d_assoc", type="int", default=2)
140 parser.add_option("--l1i_assoc", type="int", default=2)
141 parser.add_option("--l2_assoc", type="int", default=8)
142 parser.add_option("--l3_assoc", type="int", default=16)
143 parser.add_option("--cacheline_size", type="int", default=64)
144
145 # dist-gem5 options
146 parser.add_option("--dist", action="store_true",
147 help="Parallel distributed gem5 simulation.")
148 parser.add_option("--is-switch", action="store_true",
149 help="Select the network switch simulator process for a"\
150 "distributed gem5 run")
151 parser.add_option("--dist-rank", default=0, action="store", type="int",
152 help="Rank of this system within the dist gem5 run.")

--- 17 unchanged lines hidden (view full) ---

170 help="Time to schedule the first dist synchronisation barrier\nDEFAULT:5200000000000t")
171 parser.add_option("--ethernet-linkspeed", default="10Gbps",
172 action="store", type="string",
173 help="Link speed in bps\nDEFAULT: 10Gbps")
174 parser.add_option("--ethernet-linkdelay", default="10us",
175 action="store", type="string",
176 help="Link delay in seconds\nDEFAULT: 10us")
177
178 # Enable Ruby
179 parser.add_option("--ruby", action="store_true")
180
181 # Run duration options
182 parser.add_option("-m", "--abs-max-tick", type="int", default=m5.MaxTick,
183 metavar="TICKS", help="Run to absolute simulated tick " \
184 "specified including ticks from a restored checkpoint")
185 parser.add_option("--rel-max-tick", type="int", default=None,
186 metavar="TICKS", help="Simulate for specified number of" \
187 " ticks relative to the simulation start tick (e.g. if " \
188 "restoring a checkpoint)")
189 parser.add_option("--maxtime", type="float", default=None,
190 help="Run to the specified absolute simulated time in " \
191 "seconds")
192 parser.add_option("-I", "--maxinsts", action="store", type="int",
193 default=None, help="""Total number of instructions to
194 simulate (default: run forever)""")
195 parser.add_option("--work-item-id", action="store", type="int",
196 help="the specific work id for exit & checkpointing")
197 parser.add_option("--num-work-ids", action="store", type="int",
198 help="Number of distinct work item types")
199 parser.add_option("--work-begin-cpu-id-exit", action="store", type="int",

--- 92 unchanged lines hidden (view full) ---

292 parser.add_option("-i", "--input", default="",
293 help="Read stdin from a file.")
294 parser.add_option("--output", default="",
295 help="Redirect stdout to a file.")
296 parser.add_option("--errout", default="",
297 help="Redirect stderr to a file.")
298
299def addFSOptions(parser):
300 # Simulation options
301 parser.add_option("--timesync", action="store_true",
302 help="Prevent simulated time from getting ahead of real time")
303
304 # System options
305 parser.add_option("--kernel", action="store", type="string")
306 parser.add_option("--os-type", action="store", type="choice",
307 choices=os_types[buildEnv['TARGET_ISA']], default="linux",

--- 48 unchanged lines hidden ---