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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user