cpu: Replace the fastmem with a new CPU model
authorAndreas Sandberg <andreas.sandberg@arm.com>
Tue, 15 Mar 2016 15:45:12 +0000 (15:45 +0000)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Wed, 12 Sep 2018 09:25:26 +0000 (09:25 +0000)
commit719eb033fe435133abf15501c249eec10d1c861f
tree2f6bb0f128c889b3503a9f6b8ce3b7fb69cbd3a5
parent50cd8a53c640dbcc0cd775cb96c956572c880979
cpu: Replace the fastmem with a new CPU model

The AtomicSimpleCPU used to be able to access memory directly to speed
up simulation if no caches are used. This is fine as long as no
switching between CPU models is required. In order to switch to a new
CPU model that requires caches, we currently need to checkpoint the
system and restore it into a new configuration. The new
'atomic_noncaching' memory mode provides a solution that avoids this
issue since caches are bypassed in this mode. This changeset removes
the old fastmem option from the AtomicSimpleCPU and introduces a new
CPU, NonCachingSimpleCPU, which derives from the AtomicSimpleCPU.

The NonCachingSimpleCPU uses the same mechanism as the AtomicSimpleCPU
used to use when accessing memory in when fastmem was enabled.

This changeset also introduces a new switcheroo test that tests
switching between a NonCachingSimpleCPU and a TimingSimpleCPU with
caches.

Change-Id: If01893f9b37528b14f530c11ce6f53c097582c21
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/12419
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
13 files changed:
configs/common/CpuConfig.py
configs/common/Options.py
configs/example/fs.py
configs/example/se.py
src/cpu/simple/AtomicSimpleCPU.py
src/cpu/simple/NonCachingSimpleCPU.py [new file with mode: 0644]
src/cpu/simple/SConscript
src/cpu/simple/atomic.cc
src/cpu/simple/atomic.hh
src/cpu/simple/noncaching.cc [new file with mode: 0644]
src/cpu/simple/noncaching.hh [new file with mode: 0644]
tests/configs/realview-switcheroo-noncaching-timing.py [new file with mode: 0644]
tests/testing/tests.py