mem-ruby: Fix issues in protocols due to multi-RubySystem (#1690)

Starting with https://github.com/gem5/gem5/pull/1453 , some Ruby
structures require a block size be set
and other require a pointer to the Ruby system. This fixes some cases
which were not covered by the per-checkin tests but seen in daily+
tests. In particular:

 - WriteMasks and PerfectCacheMemory must explicitly set a block size.
 - NetDest and RubyProxyPort require RubySystem pointer.
 - Classes inheriting Message now have a setRubySystem collecting all
   objects that need a RubySystem pointer and this should be called in
   the constructor of the Message.

This commit makes sure all of these happen. This should fix daily
arm_boot_tests and daily learning_gem5 tests.
This commit is contained in:
Matthew Poremba
2024-10-21 12:30:03 -07:00
committed by GitHub
parent 2c679bfa04
commit 16217f843f
7 changed files with 10 additions and 2 deletions

View File

@@ -773,10 +773,13 @@ $c_ident::init()
# For objects that require knowing the cache line size,
# set the value here.
if vtype.c_ident in ("TBETable"):
if vtype.c_ident in ("TBETable", "PerfectCacheMemory"):
block_size_func = "m_ruby_system->getBlockSizeBytes()"
code(f"(*{vid}).setBlockSize({block_size_func});")
if vtype.c_ident in ("NetDest"):
code(f"(*{vid}).setRubySystem(m_ruby_system);")
for param in self.config_parameters:
if param.type_ast.type.ident == "CacheMemory":
assert param.pointer