diff options
author | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2017-03-13 18:19:08 +0000 |
---|---|---|
committer | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2017-06-13 15:52:32 +0000 |
commit | 12db50c89584938839e035da47d206250cbfd7c2 (patch) | |
tree | 831a4151b29cdc14958b8dab2cce97fc3136d7b6 /configs/ruby/GPU_RfO.py | |
parent | dd3fc1f996679f4cfd29f980d43a0652542e6d9b (diff) | |
download | gem5-12db50c89584938839e035da47d206250cbfd7c2.tar.xz |
ruby: Add support for address ranges in the directory
Previously the directory covered a flat address range that always
started from address 0. This change adds a vector of address ranges
with interleaving and hashing that each directory keeps track of and
the necessary flexibility to support systems with non continuous
memory ranges.
Change-Id: I6ea1c629bdf4c5137b7d9c89dbaf6c826adfd977
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2903
Reviewed-by: Bradford Beckmann <brad.beckmann@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'configs/ruby/GPU_RfO.py')
-rw-r--r-- | configs/ruby/GPU_RfO.py | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/configs/ruby/GPU_RfO.py b/configs/ruby/GPU_RfO.py index 71e21d932..832ea4422 100644 --- a/configs/ruby/GPU_RfO.py +++ b/configs/ruby/GPU_RfO.py @@ -371,24 +371,14 @@ class L3Cntrl(L3Cache_Controller, CntrlBase): self.probeToL3 = probe_to_l3 self.respToL3 = resp_to_l3 -class DirMem(RubyDirectoryMemory, CntrlBase): - def create(self, options, ruby_system, system): - self.version = self.versionCount() - - phys_mem_size = AddrRange(options.mem_size).size() - mem_module_size = phys_mem_size / options.num_dirs - dir_size = MemorySize('0B') - dir_size.value = mem_module_size - self.size = dir_size - class DirCntrl(Directory_Controller, CntrlBase): - def create(self, options, ruby_system, system): + def create(self, options, dir_ranges, ruby_system, system): self.version = self.versionCount() self.response_latency = 30 - self.directory = DirMem() - self.directory.create(options, ruby_system, system) + self.addr_ranges = dir_ranges + self.directory = RubyDirectoryMemory() self.L3CacheMemory = L3Cache() self.L3CacheMemory.create(options, ruby_system, system) @@ -467,10 +457,28 @@ def create_system(options, full_system, system, dma_devices, ruby_system): # This is the base crossbar that connects the L3s, Dirs, and cpu/gpu # Clusters mainCluster = Cluster(extBW = 512, intBW = 512) # 1 TB/s + + if options.numa_high_bit: + numa_bit = options.numa_high_bit + else: + # if the numa_bit is not specified, set the directory bits as the + # lowest bits above the block offset bits, and the numa_bit as the + # highest of those directory bits + dir_bits = int(math.log(options.num_dirs, 2)) + block_size_bits = int(math.log(options.cacheline_size, 2)) + numa_bit = block_size_bits + dir_bits - 1 + for i in xrange(options.num_dirs): + dir_ranges = [] + for r in system.mem_ranges: + addr_range = m5.objects.AddrRange(r.start, size = r.size(), + intlvHighBit = numa_bit, + intlvBits = dir_bits, + intlvMatch = i) + dir_ranges.append(addr_range) dir_cntrl = DirCntrl(TCC_select_num_bits = TCC_bits) - dir_cntrl.create(options, ruby_system, system) + dir_cntrl.create(options, dir_ranges, ruby_system, system) dir_cntrl.number_of_TBEs = 2560 * options.num_compute_units #Enough TBEs for all TCP TBEs |