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; --- 94 unchanged lines hidden (view full) --- 103 total_mem_size = MemorySize('0B') 104 105 dir_bits = int(math.log(options.num_dirs, 2)) 106 107 if options.numa_high_bit: 108 numa_bit = options.numa_high_bit 109 else: 110 # if not specified, use the lowest bits above the block offest |
111 if dir_bits > 0: 112 # add 5 because bits 0-5 are the block offset 113 numa_bit = dir_bits + 5 114 else: 115 numa_bit = 6 |
116 117 for dir_cntrl in dir_cntrls: 118 total_mem_size.value += dir_cntrl.directory.size.value 119 dir_cntrl.directory.numa_high_bit = numa_bit 120 121 physmem_size = long(system.physmem.range.second) - \ 122 long(system.physmem.range.first) + 1 123 assert(total_mem_size.value == physmem_size) --- 16 unchanged lines hidden --- |