John Alsop has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/18968
Change subject: mem-ruby: Enable set size increase
......................................................................
mem-ruby: Enable set size increase
When SETSIZE_128 or SETSIZE_256 environment variable is set,
use size 128 or 256 bitset for Set class, respectively.
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:
SETSIZE_128 = True
Change-Id: I314a3cadca8ce975fcf4a60d9022494751688e88
---
M SConstruct
M src/mem/ruby/common/SConscript
M src/mem/ruby/common/Set.hh
3 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/SConstruct b/SConstruct
index 53b8c9d..2d0556b 100755
--- a/SConstruct
+++ b/SConstruct
@@ -1013,14 +1013,19 @@
EnumVariable('PROTOCOL', 'Coherence protocol for Ruby', 'None',
all_protocols),
EnumVariable('BACKTRACE_IMPL', 'Post-mortem dump implementation',
- backtrace_impls[-1], backtrace_impls)
+ backtrace_impls[-1], backtrace_impls),
+ BoolVariable('SETSIZE_128', 'Use a larger set size (128 instead of
64)',
+ False),
+ BoolVariable('SETSIZE_256', 'Use a larger set size (256 instead of
64)',
+ False),
)
# These variables get exported to #defines in config/*.hh (see
src/SConscript).
export_vars +=
['USE_FENV', 'SS_COMPATIBLE_FP', 'TARGET_ISA', 'TARGET_GPU_ISA',
'CP_ANNOTATE', 'USE_POSIX_CLOCK', 'USE_KVM', 'USE_TUNTAP',
'PROTOCOL', 'HAVE_PROTOBUF', 'HAVE_VALGRIND',
- 'HAVE_PERF_ATTR_EXCLUDE_HOST', 'USE_PNG']
+ 'HAVE_PERF_ATTR_EXCLUDE_HOST', 'USE_PNG', 'SETSIZE_128',
+ 'SETSIZE_256']
###################################################
#
diff --git a/src/mem/ruby/common/SConscript b/src/mem/ruby/common/SConscript
index a19268c..95c5f51 100644
--- a/src/mem/ruby/common/SConscript
+++ b/src/mem/ruby/common/SConscript
@@ -33,6 +33,11 @@
if env['PROTOCOL'] == 'None':
Return()
+if env['SETSIZE_128'] == True:
+ env.Append(CPPDEFINES=['SETSIZE_128'])
+elif env['SETSIZE_256'] == True:
+ env.Append(CPPDEFINES=['SETSIZE_256'])
+
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 cb01c96..5f93b9b 100644
--- a/src/mem/ruby/common/Set.hh
+++ b/src/mem/ruby/common/Set.hh
@@ -39,8 +39,15 @@
#include "base/logging.hh"
#include "mem/ruby/common/TypeDefines.hh"
-// Change for systems with more than 64 controllers of a particular type.
+// Make sure SETSIZE_128 is defined if more than 64 controllers of any
+// type are needed
+#ifdef SETSIZE_128
+const int NUMBER_BITS_PER_SET = 128;
+#elif defined SETSIZE_256
+const int NUMBER_BITS_PER_SET = 256;
+#else
const int NUMBER_BITS_PER_SET = 64;
+#endif
class Set
{
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/18968
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I314a3cadca8ce975fcf4a60d9022494751688e88
Gerrit-Change-Number: 18968
Gerrit-PatchSet: 1
Gerrit-Owner: John Alsop <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev