diff options
Diffstat (limited to 'configs/ruby/MESI_Three_Level.py')
-rw-r--r-- | configs/ruby/MESI_Three_Level.py | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/configs/ruby/MESI_Three_Level.py b/configs/ruby/MESI_Three_Level.py index 1d4b6ebf6..5d9d5b2f8 100644 --- a/configs/ruby/MESI_Three_Level.py +++ b/configs/ruby/MESI_Three_Level.py @@ -33,7 +33,7 @@ import math import m5 from m5.objects import * from m5.defines import buildEnv -from Ruby import create_topology +from Ruby import create_topology, create_directories from Ruby import send_evicts # @@ -66,7 +66,6 @@ def create_system(options, full_system, system, dma_ports, ruby_system): l0_cntrl_nodes = [] l1_cntrl_nodes = [] l2_cntrl_nodes = [] - dir_cntrl_nodes = [] dma_cntrl_nodes = [] assert (options.num_cpus % options.num_clusters == 0) @@ -194,31 +193,15 @@ def create_system(options, full_system, system, dma_ports, ruby_system): l2_cntrl.responseToL2Cache = MessageBuffer() l2_cntrl.responseToL2Cache.slave = ruby_system.network.master - phys_mem_size = sum(map(lambda r: r.size(), system.mem_ranges)) - assert(phys_mem_size % options.num_dirs == 0) - mem_module_size = phys_mem_size / options.num_dirs - # Run each of the ruby memory controllers at a ratio of the frequency of # the ruby system # clk_divider value is a fix to pass regression. ruby_system.memctrl_clk_domain = DerivedClockDomain( clk_domain = ruby_system.clk_domain, clk_divider = 3) - for i in xrange(options.num_dirs): - # - # Create the Ruby objects associated with the directory controller - # - dir_size = MemorySize('0B') - dir_size.value = mem_module_size - - dir_cntrl = Directory_Controller(version = i, - directory = RubyDirectoryMemory(version = i, size = dir_size), - transitions_per_cycle = options.ports, - ruby_system = ruby_system) - - exec("ruby_system.dir_cntrl%d = dir_cntrl" % i) - dir_cntrl_nodes.append(dir_cntrl) - + dir_cntrl_nodes = create_directories(options, system.mem_ranges, + ruby_system) + for dir_cntrl in dir_cntrl_nodes: # Connect the directory controllers and the network dir_cntrl.requestToDir = MessageBuffer() dir_cntrl.requestToDir.slave = ruby_system.network.master |