169,178d168
< 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
<
180c170
< def create(self, options, ruby_system, system):
---
> def create(self, options, dir_ranges, ruby_system, system):
185,186c175,176
< self.directory = DirMem()
< self.directory.create(options, ruby_system, system)
---
> self.addr_ranges = dir_ranges
> self.directory = RubyDirectoryMemory()
247a238,248
>
> 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
>
248a250,256
> 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)
249a258
>
251c260
< dir_cntrl.create(options, ruby_system, system)
---
> dir_cntrl.create(options, dir_ranges, ruby_system, system)