diff options
author | Jason Power ext:(%2C%20Joel%20Hestness%20%3Chestness%40cs.wisc.edu%3E) <power.jg@gmail.com> | 2012-10-27 16:01:09 -0500 |
---|---|---|
committer | Jason Power ext:(%2C%20Joel%20Hestness%20%3Chestness%40cs.wisc.edu%3E) <power.jg@gmail.com> | 2012-10-27 16:01:09 -0500 |
commit | 931ec6b7ccac5978c13c1ec9283d23f51085ddab (patch) | |
tree | cdb4311e4edb1cee40e4d76d56123dde5b4b9e3e /configs/ruby/Ruby.py | |
parent | a4d8996fd9224212ab042fd15316ba451201a11f (diff) | |
download | gem5-931ec6b7ccac5978c13c1ec9283d23f51085ddab.tar.xz |
Ruby: Use block size in configuring directory bits in address
This patch replaces hard coded values used in Ruby's configuration files
for setting directory bits with values based on the block size in use.
Diffstat (limited to 'configs/ruby/Ruby.py')
-rw-r--r-- | configs/ruby/Ruby.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py index bcb939165..40ee63195 100644 --- a/configs/ruby/Ruby.py +++ b/configs/ruby/Ruby.py @@ -173,16 +173,16 @@ def create_system(options, system, piobus = None, dma_ports = []): total_mem_size = MemorySize('0B') dir_bits = int(math.log(options.num_dirs, 2)) + ruby.block_size_bytes = options.cacheline_size + block_size_bits = int(math.log(options.cacheline_size, 2)) if options.numa_high_bit: numa_bit = options.numa_high_bit else: - # if not specified, use the lowest bits above the block offest - if dir_bits > 0: - # add 5 because bits 0-5 are the block offset - numa_bit = dir_bits + 5 - else: - numa_bit = 6 + # 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 + numa_bit = block_size_bits + dir_bits - 1 for dir_cntrl in dir_cntrls: total_mem_size.value += dir_cntrl.directory.size.value |