diff options
Diffstat (limited to 'configs/ruby/MESI_Three_Level.py')
-rw-r--r-- | configs/ruby/MESI_Three_Level.py | 66 |
1 files changed, 45 insertions, 21 deletions
diff --git a/configs/ruby/MESI_Three_Level.py b/configs/ruby/MESI_Three_Level.py index 74eb15887..262022911 100644 --- a/configs/ruby/MESI_Three_Level.py +++ b/configs/ruby/MESI_Three_Level.py @@ -127,16 +127,24 @@ def create_system(options, full_system, system, dma_ports, ruby_system): l1_cntrl_nodes.append(l1_cntrl) # Connect the L0 and L1 controllers - l0_cntrl.bufferToL1 = l1_cntrl.bufferFromL0 - l0_cntrl.bufferFromL1 = l1_cntrl.bufferToL0 + l0_cntrl.mandatoryQueue = MessageBuffer() + l0_cntrl.bufferToL1 = MessageBuffer(ordered = True) + l1_cntrl.bufferFromL0 = l0_cntrl.bufferToL1 + l0_cntrl.bufferFromL1 = MessageBuffer(ordered = True) + l1_cntrl.bufferToL0 = l0_cntrl.bufferFromL1 # Connect the L1 controllers and the network - l1_cntrl.requestToL2 = ruby_system.network.slave - l1_cntrl.responseToL2 = ruby_system.network.slave - l1_cntrl.unblockToL2 = ruby_system.network.slave + l1_cntrl.requestToL2 = MessageBuffer() + l1_cntrl.requestToL2.master = ruby_system.network.slave + l1_cntrl.responseToL2 = MessageBuffer() + l1_cntrl.responseToL2.master = ruby_system.network.slave + l1_cntrl.unblockToL2 = MessageBuffer() + l1_cntrl.unblockToL2.master = ruby_system.network.slave - l1_cntrl.requestFromL2 = ruby_system.network.master - l1_cntrl.responseFromL2 = ruby_system.network.master + l1_cntrl.requestFromL2 = MessageBuffer() + l1_cntrl.requestFromL2.slave = ruby_system.network.master + l1_cntrl.responseFromL2 = MessageBuffer() + l1_cntrl.responseFromL2.slave = ruby_system.network.master for j in xrange(num_l2caches_per_cluster): @@ -155,13 +163,19 @@ def create_system(options, full_system, system, dma_ports, ruby_system): l2_cntrl_nodes.append(l2_cntrl) # Connect the L2 controllers and the network - l2_cntrl.DirRequestFromL2Cache = ruby_system.network.slave - l2_cntrl.L1RequestFromL2Cache = ruby_system.network.slave - l2_cntrl.responseFromL2Cache = ruby_system.network.slave - - l2_cntrl.unblockToL2Cache = ruby_system.network.master - l2_cntrl.L1RequestToL2Cache = ruby_system.network.master - l2_cntrl.responseToL2Cache = ruby_system.network.master + l2_cntrl.DirRequestFromL2Cache = MessageBuffer() + l2_cntrl.DirRequestFromL2Cache.master = ruby_system.network.slave + l2_cntrl.L1RequestFromL2Cache = MessageBuffer() + l2_cntrl.L1RequestFromL2Cache.master = ruby_system.network.slave + l2_cntrl.responseFromL2Cache = MessageBuffer() + l2_cntrl.responseFromL2Cache.master = ruby_system.network.slave + + l2_cntrl.unblockToL2Cache = MessageBuffer() + l2_cntrl.unblockToL2Cache.slave = ruby_system.network.master + l2_cntrl.L1RequestToL2Cache = MessageBuffer() + l2_cntrl.L1RequestToL2Cache.slave = ruby_system.network.master + 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) @@ -191,9 +205,13 @@ def create_system(options, full_system, system, dma_ports, ruby_system): dir_cntrl_nodes.append(dir_cntrl) # Connect the directory controllers and the network - dir_cntrl.requestToDir = ruby_system.network.master - dir_cntrl.responseToDir = ruby_system.network.master - dir_cntrl.responseFromDir = ruby_system.network.slave + dir_cntrl.requestToDir = MessageBuffer() + dir_cntrl.requestToDir.slave = ruby_system.network.master + dir_cntrl.responseToDir = MessageBuffer() + dir_cntrl.responseToDir.slave = ruby_system.network.master + dir_cntrl.responseFromDir = MessageBuffer() + dir_cntrl.responseFromDir.master = ruby_system.network.slave + dir_cntrl.responseFromMemory = MessageBuffer() for i, dma_port in enumerate(dma_ports): # @@ -212,8 +230,11 @@ def create_system(options, full_system, system, dma_ports, ruby_system): dma_cntrl_nodes.append(dma_cntrl) # Connect the dma controller to the network - dma_cntrl.responseFromDir = ruby_system.network.master - dma_cntrl.requestToDir = ruby_system.network.slave + dma_cntrl.mandatoryQueue = MessageBuffer() + dma_cntrl.responseFromDir = MessageBuffer(ordered = True) + dma_cntrl.responseFromDir.slave = ruby_system.network.master + dma_cntrl.requestToDir = MessageBuffer() + dma_cntrl.requestToDir.master = ruby_system.network.slave all_cntrls = l0_cntrl_nodes + \ l1_cntrl_nodes + \ @@ -231,8 +252,11 @@ def create_system(options, full_system, system, dma_ports, ruby_system): ruby_system.io_controller = io_controller # Connect the dma controller to the network - io_controller.responseFromDir = ruby_system.network.master - io_controller.requestToDir = ruby_system.network.slave + io_controller.mandatoryQueue = MessageBuffer() + io_controller.responseFromDir = MessageBuffer(ordered = True) + io_controller.responseFromDir.slave = ruby_system.network.master + io_controller.requestToDir = MessageBuffer() + io_controller.requestToDir.master = ruby_system.network.slave all_cntrls = all_cntrls + [io_controller] |