1c1
< # Copyright (c) 2012 ARM Limited
---
> # Copyright (c) 2012, 2017 ARM Limited
87d86
< block_size_bits = int(math.log(options.cacheline_size, 2))
89,97d87
< 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))
< numa_bit = block_size_bits + dir_bits - 1
<
107,108d96
< dir_cntrl.directory.numa_high_bit = numa_bit
<
210a199,229
> def create_directories(options, mem_ranges, ruby_system):
> dir_cntrl_nodes = []
> 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 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 = Directory_Controller()
> dir_cntrl.version = i
> dir_cntrl.directory = RubyDirectoryMemory()
> dir_cntrl.ruby_system = ruby_system
> dir_cntrl.addr_ranges = dir_ranges
>
> exec("ruby_system.dir_cntrl%d = dir_cntrl" % i)
> dir_cntrl_nodes.append(dir_cntrl)
> return dir_cntrl_nodes
>