From f5cf6d5f5ef8df0fedcba9d3cf3c16d76a6dceae Mon Sep 17 00:00:00 2001 From: John Alsop Date: Thu, 20 Apr 2017 11:26:39 -0400 Subject: mem-ruby: Enable set size increase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add NUMBER_BITS_PER_SET environment variable to control the size of the bitmask in Set.hh (default=64). Necessary for configs which require >64 instances of a given machine type. This can be set in the build_opts file, e.g. by adding the following line: NUMBER_BITS_PER_SET = Change-Id: I314a3cadca8ce975fcf4a60d9022494751688e88 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18968 Reviewed-by: Tiago Mück Reviewed-by: Jason Lowe-Power Reviewed-by: Nikos Nikoleris Maintainer: Jason Lowe-Power Tested-by: kokoro --- src/mem/ruby/common/SConscript | 2 ++ src/mem/ruby/common/Set.hh | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mem/ruby') diff --git a/src/mem/ruby/common/SConscript b/src/mem/ruby/common/SConscript index a19268cba..b97391c0a 100644 --- a/src/mem/ruby/common/SConscript +++ b/src/mem/ruby/common/SConscript @@ -33,6 +33,8 @@ Import('*') if env['PROTOCOL'] == 'None': Return() +env.Append(CPPDEFINES={'NUMBER_BITS_PER_SET': env['NUMBER_BITS_PER_SET']}) + Source('Address.cc') Source('BoolVec.cc') Source('Consumer.cc') diff --git a/src/mem/ruby/common/Set.hh b/src/mem/ruby/common/Set.hh index cb01c9613..aba38f51e 100644 --- a/src/mem/ruby/common/Set.hh +++ b/src/mem/ruby/common/Set.hh @@ -39,13 +39,11 @@ #include "base/logging.hh" #include "mem/ruby/common/TypeDefines.hh" -// Change for systems with more than 64 controllers of a particular type. -const int NUMBER_BITS_PER_SET = 64; - class Set { private: // Number of bits in use in this set. + // can be defined in build_opts file (default=64). int m_nSize; std::bitset bits; -- cgit v1.2.3