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 |
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: |
79 print("Error: --command-line and --command-line-file are " 80 "mutually exclusive") |
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: |
315 print("Error: script doesn't take any positional arguments") |
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: |
328 print("Error benchmark %s has not been defined." % options.benchmark) 329 print("Valid benchmarks are: %s" % DefinedBenchmarks) |
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: |
362 print("Error I don't know how to create more than 2 systems.") |
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 --- |