from m5.util import addToPath
import os, optparse, sys
-if buildEnv['FULL_SYSTEM']:
- panic("This script requires system-emulation mode (*_SE).")
-
# Get paths we might need
config_path = os.path.dirname(os.path.abspath(__file__))
config_root = os.path.dirname(config_path)
-m5_root = os.path.dirname(config_root)
addToPath(config_root+'/configs/common')
addToPath(config_root+'/configs/ruby')
+addToPath(config_root+'/configs/topologies')
import Ruby
+import Options
parser = optparse.OptionParser()
+Options.addCommonOptions(parser)
-#
# Add the ruby specific and protocol specific options
-#
Ruby.define_options(parser)
-execfile(os.path.join(config_root, "configs/common", "Options.py"))
-
(options, args) = parser.parse_args()
#
options.num_cpus = 1
cpu = TimingSimpleCPU(cpu_id=0)
-system = System(cpu = cpu, physmem = PhysicalMemory())
+system = System(cpu = cpu, physmem = SimpleMemory(null = True))
+system.clock = options.sys_clock
-system.ruby = Ruby.create_system(options, system)
+Ruby.create_system(options, system)
assert(len(system.ruby._cpu_ruby_ports) == 1)
+# create the interrupt controller
+cpu.createInterruptController()
+
#
# Tie the cpu cache ports to the ruby cpu ports and
# physmem, respectively
#
-cpu.icache_port = system.ruby._cpu_ruby_ports[0].port
-cpu.dcache_port = system.ruby._cpu_ruby_ports[0].port
+cpu.connectAllPorts(system.ruby._cpu_ruby_ports[0])
# -----------------------
# run simulation
# -----------------------
-root = Root(system = system)
+root = Root(full_system = False, system = system)
root.system.mem_mode = 'timing'
# Not much point in this being higher than the L1 latency