diff options
Diffstat (limited to 'configs')
-rw-r--r-- | configs/common/FSConfig.py | 2 | ||||
-rw-r--r-- | configs/example/ruby_fs.py | 18 | ||||
-rw-r--r-- | configs/ruby/Ruby.py | 10 |
3 files changed, 23 insertions, 7 deletions
diff --git a/configs/common/FSConfig.py b/configs/common/FSConfig.py index 83e4cae5d..967570265 100644 --- a/configs/common/FSConfig.py +++ b/configs/common/FSConfig.py @@ -253,7 +253,7 @@ def makeArmSystem(mem_mode, machine_type, mdesc = None, bare_metal=False): self.flags_addr = self.realview.realview_io.pio_addr + 0x30 if mdesc.disk().count('android'): - boot_flags += "init=/init " + boot_flags += " init=/init " self.boot_osflags = boot_flags self.physmem.port = self.membus.port diff --git a/configs/example/ruby_fs.py b/configs/example/ruby_fs.py index ba4671d6e..e6ac5f8c8 100644 --- a/configs/example/ruby_fs.py +++ b/configs/example/ruby_fs.py @@ -30,18 +30,18 @@ # Full system configuraiton for ruby # -import os import optparse +import os import sys from os.path import join as joinpath import m5 from m5.defines import buildEnv from m5.objects import * -from m5.util import addToPath, panic +from m5.util import addToPath, fatal if not buildEnv['FULL_SYSTEM']: - panic("This script requires full-system mode (*_FS).") + fatal("This script requires full-system mode (*_FS).") addToPath('../common') addToPath('../ruby') @@ -60,7 +60,9 @@ config_root = os.path.dirname(config_path) m5_root = os.path.dirname(config_root) parser = optparse.OptionParser() - +# System options +parser.add_option("--kernel", action="store", type="string") +parser.add_option("--script", action="store", type="string") # Benchmark options parser.add_option("-b", "--benchmark", action="store", type="string", dest="benchmark", @@ -117,9 +119,15 @@ elif buildEnv['TARGET_ISA'] == "x86": else: fatal("incapable of building non-alpha or non-x86 full system!") -Ruby.create_system(options, system, system.piobus, system._dma_devices) +if options.kernel is not None: + system.kernel = binary(options.kernel) + +if options.script is not None: + system.readfile = options.script system.cpu = [CPUClass(cpu_id=i) for i in xrange(options.num_cpus)] +Ruby.create_system(options, system, system.piobus, system._dma_devices) + for (i, cpu) in enumerate(system.cpu): # diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py index 9174709b4..e83e7f23f 100644 --- a/configs/ruby/Ruby.py +++ b/configs/ruby/Ruby.py @@ -40,6 +40,8 @@ def define_options(parser): help="the number of rows in the mesh topology") parser.add_option("--garnet-network", type="string", default=None, help="'fixed'|'flexible'") + parser.add_option("--network-fault-model", action="store_true", default=False, + help="enable network fault model: see src/mem/ruby/network/fault_model/") # ruby mapping options parser.add_option("--numa-high-bit", type="int", default=0, @@ -109,7 +111,13 @@ def create_system(options, system, piobus = None, dma_devices = []): print "Error: could not create topology %s" % options.topology raise - network = NetworkClass(ruby_system = ruby, topology = net_topology) + if options.network_fault_model: + assert(options.garnet_network == "fixed") + fault_model = FaultModel() + network = NetworkClass(ruby_system = ruby, topology = net_topology,\ + enable_fault_model=True, fault_model = fault_model) + else: + network = NetworkClass(ruby_system = ruby, topology = net_topology) # # Loop through the directory controlers. |