summaryrefslogtreecommitdiff
path: root/src/cpu/BaseCPU.py
diff options
context:
space:
mode:
authorAndreas Sandberg <Andreas.Sandberg@ARM.com>2013-01-07 13:05:44 -0500
committerAndreas Sandberg <Andreas.Sandberg@ARM.com>2013-01-07 13:05:44 -0500
commita7e0cbeb36394eec3960dc0e2fb15377880e9e98 (patch)
tree3aa15e38997aeabd2f39158252687a73a9da2fea /src/cpu/BaseCPU.py
parent901258c22b631cd7c14e564bd5f1cde36347515e (diff)
downloadgem5-a7e0cbeb36394eec3960dc0e2fb15377880e9e98.tar.xz
cpu: Introduce sanity checks when switching between CPUs
This patch introduces the following sanity checks when switching between CPUs: * Check that the set of new and old CPUs do not overlap. Having an overlap between the set of new CPUs and the set of old CPUs is currently not supported. Doing such a switch used to result in the following assertion error: BaseCPU::takeOverFrom(BaseCPU*): \ Assertion `!new_itb_port->isConnected()' failed. * Check that all new CPUs are in the switched out state. * Check that all old CPUs are in the switched in state.
Diffstat (limited to 'src/cpu/BaseCPU.py')
-rw-r--r--src/cpu/BaseCPU.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cpu/BaseCPU.py b/src/cpu/BaseCPU.py
index 697be87e1..957203150 100644
--- a/src/cpu/BaseCPU.py
+++ b/src/cpu/BaseCPU.py
@@ -95,6 +95,7 @@ class BaseCPU(MemObject):
code('''
void switchOut();
void takeOverFrom(BaseCPU *cpu);
+ bool switchedOut();
''')
def takeOverFrom(self, old_cpu):