1# 2# Copyright (c) 2010-2015 Advanced Micro Devices, Inc. 3# All rights reserved. 4# 5# For use for simulation and test purposes only 6# 7# Redistribution and use in source and binary forms, with or without 8# modification, are permitted provided that the following conditions are met: --- 152 unchanged lines hidden (view full) --- 161 req_to_l3, probe_to_l3, resp_to_l3): 162 self.reqToDir = req_to_dir 163 self.respToDir = resp_to_dir 164 self.l3UnblockToDir = l3_unblock_to_dir 165 self.reqToL3 = req_to_l3 166 self.probeToL3 = probe_to_l3 167 self.respToL3 = resp_to_l3 168 |
169class DirCntrl(Directory_Controller, CntrlBase): |
170 def create(self, options, dir_ranges, ruby_system, system): |
171 self.version = self.versionCount() 172 173 self.response_latency = 30 174 |
175 self.addr_ranges = dir_ranges 176 self.directory = RubyDirectoryMemory() |
177 178 self.L3CacheMemory = L3Cache() 179 self.L3CacheMemory.create(options, ruby_system, system) 180 181 self.l3_hit_latency = max(self.L3CacheMemory.dataAccessLatency, 182 self.L3CacheMemory.tagAccessLatency) 183 184 self.number_of_TBEs = options.num_tbes --- 45 unchanged lines hidden (view full) --- 230 # 231 # Must create the individual controllers before the network to ensure 232 # the controller constructors are called before the network constructor 233 # 234 235 # This is the base crossbar that connects the L3s, Dirs, and cpu 236 # Cluster 237 mainCluster = Cluster(extBW = 512, intBW = 512) # 1 TB/s |
238 239 if options.numa_high_bit: 240 numa_bit = options.numa_high_bit 241 else: 242 # if the numa_bit is not specified, set the directory bits as the 243 # lowest bits above the block offset bits, and the numa_bit as the 244 # highest of those directory bits 245 dir_bits = int(math.log(options.num_dirs, 2)) 246 block_size_bits = int(math.log(options.cacheline_size, 2)) 247 numa_bit = block_size_bits + dir_bits - 1 248 |
249 for i in xrange(options.num_dirs): |
250 dir_ranges = [] 251 for r in system.mem_ranges: 252 addr_range = m5.objects.AddrRange(r.start, size = r.size(), 253 intlvHighBit = numa_bit, 254 intlvBits = dir_bits, 255 intlvMatch = i) 256 dir_ranges.append(addr_range) |
257 |
258 |
259 dir_cntrl = DirCntrl(TCC_select_num_bits = 0) |
260 dir_cntrl.create(options, dir_ranges, ruby_system, system) |
261 262 # Connect the Directory controller to the ruby network 263 dir_cntrl.requestFromCores = MessageBuffer(ordered = True) 264 dir_cntrl.requestFromCores.slave = ruby_system.network.master 265 266 dir_cntrl.responseFromCores = MessageBuffer() 267 dir_cntrl.responseFromCores.slave = ruby_system.network.master 268 --- 67 unchanged lines hidden --- |