fs.py (12490:a98a4a21417a) fs.py (12564:2778478ca882)
1# Copyright (c) 2010-2013, 2016 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# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40#
41# Authors: Ali Saidi
42# Brad Beckmann
43
1# Copyright (c) 2010-2013, 2016 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# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40#
41# Authors: Ali Saidi
42# Brad Beckmann
43
44from __future__ import print_function
45
44import optparse
45import sys
46
47import m5
48from m5.defines import buildEnv
49from m5.objects import *
50from m5.util import addToPath, fatal, warn
51from m5.util.fdthelper import *

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

69# configuration if that's the case.
70have_kvm_support = 'BaseKvmCPU' in globals()
71def is_kvm_cpu(cpu_class):
72 return have_kvm_support and cpu_class != None and \
73 issubclass(cpu_class, BaseKvmCPU)
74
75def cmd_line_template():
76 if options.command_line and options.command_line_file:
46import optparse
47import sys
48
49import m5
50from m5.defines import buildEnv
51from m5.objects import *
52from m5.util import addToPath, fatal, warn
53from m5.util.fdthelper import *

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

71# configuration if that's the case.
72have_kvm_support = 'BaseKvmCPU' in globals()
73def is_kvm_cpu(cpu_class):
74 return have_kvm_support and cpu_class != None and \
75 issubclass(cpu_class, BaseKvmCPU)
76
77def cmd_line_template():
78 if options.command_line and options.command_line_file:
77 print "Error: --command-line and --command-line-file are " \
78 "mutually exclusive"
79 print("Error: --command-line and --command-line-file are "
80 "mutually exclusive")
79 sys.exit(1)
80 if options.command_line:
81 return options.command_line
82 if options.command_line_file:
83 return open(options.command_line_file).read().strip()
84 return None
85
86def build_test_system(np):

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

305
306# Add the ruby specific and protocol specific options
307if '--ruby' in sys.argv:
308 Ruby.define_options(parser)
309
310(options, args) = parser.parse_args()
311
312if args:
81 sys.exit(1)
82 if options.command_line:
83 return options.command_line
84 if options.command_line_file:
85 return open(options.command_line_file).read().strip()
86 return None
87
88def build_test_system(np):

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

307
308# Add the ruby specific and protocol specific options
309if '--ruby' in sys.argv:
310 Ruby.define_options(parser)
311
312(options, args) = parser.parse_args()
313
314if args:
313 print "Error: script doesn't take any positional arguments"
315 print("Error: script doesn't take any positional arguments")
314 sys.exit(1)
315
316# system under test can be any CPU
317(TestCPUClass, test_mem_mode, FutureClass) = Simulation.setCPUClass(options)
318
319# Match the memories with the CPUs, based on the options for the test system
320TestMemClass = Simulation.setMemClass(options)
321
322if options.benchmark:
323 try:
324 bm = Benchmarks[options.benchmark]
325 except KeyError:
316 sys.exit(1)
317
318# system under test can be any CPU
319(TestCPUClass, test_mem_mode, FutureClass) = Simulation.setCPUClass(options)
320
321# Match the memories with the CPUs, based on the options for the test system
322TestMemClass = Simulation.setMemClass(options)
323
324if options.benchmark:
325 try:
326 bm = Benchmarks[options.benchmark]
327 except KeyError:
326 print "Error benchmark %s has not been defined." % options.benchmark
327 print "Valid benchmarks are: %s" % DefinedBenchmarks
328 print("Error benchmark %s has not been defined." % options.benchmark)
329 print("Valid benchmarks are: %s" % DefinedBenchmarks)
328 sys.exit(1)
329else:
330 if options.dual:
331 bm = [SysConfig(disk=options.disk_image, rootdev=options.root_device,
332 mem=options.mem_size, os_type=options.os_type),
333 SysConfig(disk=options.disk_image, rootdev=options.root_device,
334 mem=options.mem_size, os_type=options.os_type)]
335 else:

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

352 options.dist_sync_repeat,
353 options.dist_sync_start,
354 options.ethernet_linkspeed,
355 options.ethernet_linkdelay,
356 options.etherdump);
357elif len(bm) == 1:
358 root = Root(full_system=True, system=test_sys)
359else:
330 sys.exit(1)
331else:
332 if options.dual:
333 bm = [SysConfig(disk=options.disk_image, rootdev=options.root_device,
334 mem=options.mem_size, os_type=options.os_type),
335 SysConfig(disk=options.disk_image, rootdev=options.root_device,
336 mem=options.mem_size, os_type=options.os_type)]
337 else:

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

354 options.dist_sync_repeat,
355 options.dist_sync_start,
356 options.ethernet_linkspeed,
357 options.ethernet_linkdelay,
358 options.etherdump);
359elif len(bm) == 1:
360 root = Root(full_system=True, system=test_sys)
361else:
360 print "Error I don't know how to create more than 2 systems."
362 print("Error I don't know how to create more than 2 systems.")
361 sys.exit(1)
362
363if options.timesync:
364 root.time_sync_enable = True
365
366if options.frame_capture:
367 VncServer.frame_capture = True
368

--- 28 unchanged lines hidden ---
363 sys.exit(1)
364
365if options.timesync:
366 root.time_sync_enable = True
367
368if options.frame_capture:
369 VncServer.frame_capture = True
370

--- 28 unchanged lines hidden ---