summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2016-03-15 15:45:12 +0000
committerAndreas Sandberg <andreas.sandberg@arm.com>2018-09-12 09:25:26 +0000
commit719eb033fe435133abf15501c249eec10d1c861f (patch)
tree2f6bb0f128c889b3503a9f6b8ce3b7fb69cbd3a5 /configs
parent50cd8a53c640dbcc0cd775cb96c956572c880979 (diff)
downloadgem5-719eb033fe435133abf15501c249eec10d1c861f.tar.xz
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>
Diffstat (limited to 'configs')
-rw-r--r--configs/common/CpuConfig.py1
-rw-r--r--configs/common/Options.py2
-rw-r--r--configs/example/fs.py15
-rw-r--r--configs/example/se.py14
4 files changed, 5 insertions, 27 deletions
diff --git a/configs/common/CpuConfig.py b/configs/common/CpuConfig.py
index d70e6cfa7..f0d009e95 100644
--- a/configs/common/CpuConfig.py
+++ b/configs/common/CpuConfig.py
@@ -69,6 +69,7 @@ def _cpu_subclass_tester(name):
return tester
is_kvm_cpu = _cpu_subclass_tester("BaseKvmCPU")
+is_atomic_cpu = _cpu_subclass_tester("AtomicSimpleCPU")
def get(name):
"""Get a CPU class from a user provided class name or alias."""
diff --git a/configs/common/Options.py b/configs/common/Options.py
index 29ef74c9a..aed888191 100644
--- a/configs/common/Options.py
+++ b/configs/common/Options.py
@@ -164,8 +164,6 @@ def addCommonOptions(parser):
parser.add_option("-l", "--lpae", action="store_true")
parser.add_option("-V", "--virtualisation", action="store_true")
- parser.add_option("--fastmem", action="store_true")
-
# dist-gem5 options
parser.add_option("--dist", action="store_true",
help="Parallel distributed gem5 simulation.")
diff --git a/configs/example/fs.py b/configs/example/fs.py
index f299d761c..3997ed76c 100644
--- a/configs/example/fs.py
+++ b/configs/example/fs.py
@@ -188,22 +188,13 @@ def build_test_system(np):
test_sys.iobridge.master = test_sys.membus.slave
# Sanity check
- if options.fastmem:
- if TestCPUClass != AtomicSimpleCPU:
- fatal("Fastmem can only be used with atomic CPU!")
- if (options.caches or options.l2cache):
- fatal("You cannot use fastmem in combination with caches!")
-
if options.simpoint_profile:
- if not options.fastmem:
- # Atomic CPU checked with fastmem option already
- fatal("SimPoint generation should be done with atomic cpu and fastmem")
+ if not CpuConfig.is_atomic_cpu(TestCPUClass):
+ fatal("SimPoint generation should be done with atomic cpu")
if np > 1:
fatal("SimPoint generation not supported with more than one CPUs")
for i in xrange(np):
- if options.fastmem:
- test_sys.cpu[i].fastmem = True
if options.simpoint_profile:
test_sys.cpu[i].addSimPointProbe(options.simpoint_interval)
if options.checker:
@@ -269,8 +260,6 @@ def build_drive_system(np):
drive_sys.cpu.createThreads()
drive_sys.cpu.createInterruptController()
drive_sys.cpu.connectAllPorts(drive_sys.membus)
- if options.fastmem:
- drive_sys.cpu.fastmem = True
if options.kernel is not None:
drive_sys.kernel = binary(options.kernel)
diff --git a/configs/example/se.py b/configs/example/se.py
index 015a953da..804ef02c5 100644
--- a/configs/example/se.py
+++ b/configs/example/se.py
@@ -213,16 +213,9 @@ if CpuConfig.is_kvm_cpu(CPUClass) or CpuConfig.is_kvm_cpu(FutureClass):
fatal("KvmCPU can only be used in SE mode with x86")
# Sanity check
-if options.fastmem:
- if CPUClass != AtomicSimpleCPU:
- fatal("Fastmem can only be used with atomic CPU!")
- if (options.caches or options.l2cache):
- fatal("You cannot use fastmem in combination with caches!")
-
if options.simpoint_profile:
- if not options.fastmem:
- # Atomic CPU checked with fastmem option already
- fatal("SimPoint generation should be done with atomic cpu and fastmem")
+ if not CpuConfig.is_atomic_cpu(TestCPUClass):
+ fatal("SimPoint/BPProbe should be done with an atomic cpu")
if np > 1:
fatal("SimPoint generation not supported with more than one CPUs")
@@ -234,9 +227,6 @@ for i in xrange(np):
else:
system.cpu[i].workload = multiprocesses[i]
- if options.fastmem:
- system.cpu[i].fastmem = True
-
if options.simpoint_profile:
system.cpu[i].addSimPointProbe(options.simpoint_interval)