stdlib: use atomic_noncaching when using AtomicSimpleCPU with Ruby
mem_mode is supposed to be atomic_noncaching when running AtomicSimpleCPU with Ruby cache. Change-Id: Icb419f9370038f5c1f80dd879b187338279a5b93 Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/68877 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -97,6 +97,7 @@ class BaseCPUProcessor(AbstractProcessor):
|
||||
"'atomic_noncaching' memory mode. This will skip caching "
|
||||
"completely."
|
||||
)
|
||||
board.set_mem_mode(MemMode.ATOMIC_NONCACHING)
|
||||
else:
|
||||
board.set_mem_mode(MemMode.ATOMIC)
|
||||
else:
|
||||
|
||||
@@ -103,6 +103,16 @@ class SimpleSwitchableProcessor(SwitchableProcessor):
|
||||
def incorporate_processor(self, board: AbstractBoard) -> None:
|
||||
super().incorporate_processor(board=board)
|
||||
|
||||
if (
|
||||
board.get_cache_hierarchy().is_ruby()
|
||||
and self._mem_mode == MemMode.ATOMIC
|
||||
):
|
||||
warn(
|
||||
"Using an atomic core with Ruby will result in "
|
||||
"'atomic_noncaching' memory mode. This will skip caching "
|
||||
"completely."
|
||||
)
|
||||
self._mem_mode = MemMode.ATOMIC_NONCACHING
|
||||
board.set_mem_mode(self._mem_mode)
|
||||
|
||||
def switch(self):
|
||||
|
||||
Reference in New Issue
Block a user