1# Copyright (c) 2006-2007 The Regents of The University of Michigan 2# Copyright (c) 2009 Advanced Micro Devices, Inc. 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 17 unchanged lines hidden (view full) --- 26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27# 28# Authors: Brad Beckmann 29 30import math 31import m5 32from m5.objects import * 33from m5.defines import buildEnv |
34from Ruby import create_topology, create_directories |
35from Ruby import send_evicts 36 37# 38# Declare caches used by the protocol 39# 40class L1Cache(RubyCache): pass 41class L2Cache(RubyCache): pass 42# --- 17 unchanged lines hidden (view full) --- 60 cpu_sequencers = [] 61 62 # 63 # The ruby network creation expects the list of nodes in the system to be 64 # consistent with the NetDest list. Therefore the l1 controller nodes must be 65 # listed before the directory nodes and directory nodes before dma nodes, etc. 66 # 67 l1_cntrl_nodes = [] |
68 dma_cntrl_nodes = [] 69 70 # 71 # Must create the individual controllers before the network to ensure the 72 # controller constructors are called before the network constructor 73 # 74 block_size_bits = int(math.log(options.cacheline_size, 2)) 75 --- 61 unchanged lines hidden (view full) --- 137 # Connect the buffers from the network to the controller 138 l1_cntrl.mandatoryQueue = MessageBuffer() 139 l1_cntrl.forwardToCache = MessageBuffer() 140 l1_cntrl.forwardToCache.slave = ruby_system.network.master 141 l1_cntrl.responseToCache = MessageBuffer() 142 l1_cntrl.responseToCache.slave = ruby_system.network.master 143 144 |
145 # 146 # determine size and index bits for probe filter 147 # By default, the probe filter size is configured to be twice the 148 # size of the L2 cache. 149 # 150 pf_size = MemorySize(options.l2_size) 151 pf_size.value = pf_size.value * 2 152 dir_bits = int(math.log(options.num_dirs, 2)) --- 14 unchanged lines hidden (view full) --- 167 168 # Run each of the ruby memory controllers at a ratio of the frequency of 169 # the ruby system 170 # clk_divider value is a fix to pass regression. 171 ruby_system.memctrl_clk_domain = DerivedClockDomain( 172 clk_domain=ruby_system.clk_domain, 173 clk_divider=3) 174 |
175 dir_cntrl_nodes = create_directories(options, system.mem_ranges, 176 ruby_system) 177 for dir_cntrl in dir_cntrl_nodes: |
178 pf = ProbeFilter(size = pf_size, assoc = 4, 179 start_index_bit = pf_start_bit) 180 |
181 dir_cntrl.probeFilter = pf 182 dir_cntrl.probe_filter_enabled = options.pf_on 183 dir_cntrl.full_bit_dir_enabled = options.dir_on |
184 185 if options.recycle_latency: 186 dir_cntrl.recycle_latency = options.recycle_latency 187 |
188 # Connect the directory controller to the network 189 dir_cntrl.forwardFromDir = MessageBuffer() 190 dir_cntrl.forwardFromDir.master = ruby_system.network.slave 191 dir_cntrl.responseFromDir = MessageBuffer() 192 dir_cntrl.responseFromDir.master = ruby_system.network.slave 193 dir_cntrl.dmaResponseFromDir = MessageBuffer(ordered = True) 194 dir_cntrl.dmaResponseFromDir.master = ruby_system.network.slave 195 --- 62 unchanged lines hidden --- |