diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2010-01-29 20:29:21 -0800 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2010-01-29 20:29:21 -0800 |
commit | ce2d13195ba14766e7ac7f093b369865b6c92cac (patch) | |
tree | c7525d386d03560399a1499e8704734066843685 /configs/ruby | |
parent | dc758641c938bb3941bfc1751dc8c3781d99b441 (diff) | |
download | gem5-ce2d13195ba14766e7ac7f093b369865b6c92cac.tar.xz |
ruby: FS support using the new configuration system
Diffstat (limited to 'configs/ruby')
-rw-r--r-- | configs/ruby/MOESI_hammer.py | 50 | ||||
-rw-r--r-- | configs/ruby/Ruby.py | 13 |
2 files changed, 42 insertions, 21 deletions
diff --git a/configs/ruby/MOESI_hammer.py b/configs/ruby/MOESI_hammer.py index 41c507503..f35ab20c4 100644 --- a/configs/ruby/MOESI_hammer.py +++ b/configs/ruby/MOESI_hammer.py @@ -49,12 +49,13 @@ class L2Cache(RubyCache): latency = 15 size = 1048576 -def create_system(options, physmem): +def create_system(options, phys_mem, piobus, dma_devices): if buildEnv['PROTOCOL'] != 'MOESI_hammer': panic("This script requires the MOESI_hammer protocol to be built.") - sequencers = [] + cpu_sequencers = [] + # # The ruby network creation expects the list of nodes in the system to be # consistent with the NetDest list. Therefore the l1 controller nodes must be @@ -68,11 +69,10 @@ def create_system(options, physmem): # Must create the individual controllers before the network to ensure the # controller constructors are called before the network constructor # - for i in range(options.num_cpus): + + for i in xrange(options.num_cpus): # # First create the Ruby objects associated with this cpu - # Eventually this code should go in a python file specific to the - # MOESI_hammer protocol # l1i_profiler = CacheProfiler(description = ("l1i_%s_profiler" % i)) l1i_cache = L1Cache(cache_profiler = l1i_profiler) @@ -85,33 +85,51 @@ def create_system(options, physmem): cpu_seq = RubySequencer(icache = l1i_cache, dcache = l1d_cache, - funcmem_port = physmem.port) + physMemPort = phys_mem.port, + physmem = phys_mem) + + if piobus != None: + cpu_seq.pio_port = piobus.port l1_cntrl = L1Cache_Controller(version = i, sequencer = cpu_seq, L1IcacheMemory = l1i_cache, L1DcacheMemory = l1d_cache, L2cacheMemory = l2_cache) + # + # Add controllers and sequencers to the appropriate lists + # + cpu_sequencers.append(cpu_seq) + l1_cntrl_nodes.append(l1_cntrl) + + for i in xrange(options.num_dirs): + # + # Create the Ruby objects associated with the directory controller + # mem_cntrl = RubyMemoryControl(version = i) dir_cntrl = Directory_Controller(version = i, - directory = RubyDirectoryMemory(), + directory = \ + RubyDirectoryMemory(version = i), memBuffer = mem_cntrl) - dma_cntrl = DMA_Controller(version = i, - dma_sequencer = DMASequencer()) + dir_cntrl_nodes.append(dir_cntrl) + for i, dma_device in enumerate(dma_devices): # - # Add controllers and sequencers to the appropriate lists - # As noted above: Independent list are track to maintain the order of - # nodes/controllers assumed by the ruby network + # Create the Ruby objects associated with the dma controller # - sequencers.append(cpu_seq) - l1_cntrl_nodes.append(l1_cntrl) - dir_cntrl_nodes.append(dir_cntrl) + dma_seq = DMASequencer(version = i, + physMemPort = phys_mem.port, + physmem = phys_mem) + + dma_cntrl = DMA_Controller(version = i, + dma_sequencer = dma_seq) + + dma_cntrl.dma_sequencer.port = dma_device.dma dma_cntrl_nodes.append(dma_cntrl) all_cntrls = l1_cntrl_nodes + dir_cntrl_nodes + dma_cntrl_nodes - return (sequencers, dir_cntrl_nodes, all_cntrls) + return (cpu_sequencers, dir_cntrl_nodes, all_cntrls) diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py index 415cb5545..4504bda85 100644 --- a/configs/ruby/Ruby.py +++ b/configs/ruby/Ruby.py @@ -34,13 +34,16 @@ from m5.util import addToPath import MOESI_hammer -def create_system(options, physmem): +def create_system(options, physmem, piobus = None, dma_devices = []): protocol = buildEnv['PROTOCOL'] if protocol == "MOESI_hammer": - (sequencers, dir_cntrls, all_cntrls) = MOESI_hammer.create_system( \ - options, physmem) + (cpu_sequencers, dir_cntrls, all_cntrls) = \ + MOESI_hammer.create_system(options, \ + physmem, \ + piobus, \ + dma_devices) else: print "Error: unsupported ruby protocol" sys.exit(1) @@ -68,7 +71,7 @@ def create_system(options, physmem): ranks_per_dimm = ranksPerDimm, dimms_per_channel = dimmsPerChannel) - ruby = RubySystem(clock = '1GHz', + ruby = RubySystem(clock = options.clock, network = network, profiler = ruby_profiler, tracer = RubyTracer(), @@ -77,6 +80,6 @@ def create_system(options, physmem): protocol_trace = False), mem_size_mb = mem_size_mb) - ruby.cpu_ruby_ports = sequencers + ruby.cpu_ruby_ports = cpu_sequencers return ruby |