summaryrefslogtreecommitdiff
path: root/src/cpu/inorder
diff options
context:
space:
mode:
authorAndreas Sandberg <Andreas.Sandberg@ARM.com>2013-01-07 13:05:41 -0500
committerAndreas Sandberg <Andreas.Sandberg@ARM.com>2013-01-07 13:05:41 -0500
commit7eb0fb8b6ebffcb39b61964d4c7387455c262aae (patch)
tree99ded4ee2e8740b415c0b7b5ad7b808fbcbe405e /src/cpu/inorder
parent94561dd5268d139b721561166cbce94170701c2c (diff)
downloadgem5-7eb0fb8b6ebffcb39b61964d4c7387455c262aae.tar.xz
cpu: Check that the memory system is in the correct mode
This patch adds checks to all CPU models to make sure that the memory system is in the correct mode at startup and when resuming after a drain. Previously, we only checked that the memory system was in the right mode when resuming. This is inadequate since this is a configuration error that should be detected at startup as well as when resuming. Additionally, since the check was done using an assert, it wasn't performed when NDEBUG was set (e.g., the fast target).
Diffstat (limited to 'src/cpu/inorder')
-rw-r--r--src/cpu/inorder/cpu.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cpu/inorder/cpu.cc b/src/cpu/inorder/cpu.cc
index 1ca0657ad..3582e55ca 100644
--- a/src/cpu/inorder/cpu.cc
+++ b/src/cpu/inorder/cpu.cc
@@ -787,6 +787,12 @@ InOrderCPU::init()
{
BaseCPU::init();
+ if (!params()->defer_registration &&
+ system->getMemoryMode() != Enums::timing) {
+ fatal("The in-order CPU requires the memory system to be in "
+ "'timing' mode.\n");
+ }
+
for (ThreadID tid = 0; tid < numThreads; ++tid) {
// Set noSquashFromTC so that the CPU doesn't squash when initially
// setting up registers.