summaryrefslogtreecommitdiff
path: root/cpu/ozone/lw_back_end_impl.hh
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2006-05-16 14:09:04 -0400
committerKevin Lim <ktlim@umich.edu>2006-05-16 14:09:04 -0400
commit52383ca7cc2b4698109b71a968cde16e9f7dc6e0 (patch)
tree354833a7b623d42870366f6176d662356ce62d19 /cpu/ozone/lw_back_end_impl.hh
parentef6e2eb3c4dbf337df7380ae93360c13140f11f6 (diff)
downloadgem5-52383ca7cc2b4698109b71a968cde16e9f7dc6e0.tar.xz
Sampler updates.
cpu/ozone/cpu.hh: Updates for sampler. cpu/ozone/cpu_impl.hh: Updates for sampler, checker. cpu/ozone/inorder_back_end.hh: Sampler updates. Also support old memory system. --HG-- extra : convert_revision : 33ebe38e4c08d49c6af84032b819533b784b4fe8
Diffstat (limited to 'cpu/ozone/lw_back_end_impl.hh')
-rw-r--r--cpu/ozone/lw_back_end_impl.hh19
1 files changed, 19 insertions, 0 deletions
diff --git a/cpu/ozone/lw_back_end_impl.hh b/cpu/ozone/lw_back_end_impl.hh
index d4829629d..a82dd5b70 100644
--- a/cpu/ozone/lw_back_end_impl.hh
+++ b/cpu/ozone/lw_back_end_impl.hh
@@ -192,6 +192,7 @@ LWBackEnd<Impl>::LWBackEnd(Params *params)
numWaitingMemOps = 0;
waitingInsts = 0;
switchedOut = false;
+ switchPending = false;
// IQ.setBE(this);
LSQ.setBE(this);
@@ -631,6 +632,11 @@ LWBackEnd<Impl>::tick()
{
DPRINTF(BE, "Ticking back end\n");
+ if (switchPending && robEmpty() && !LSQ.hasStoresToWB()) {
+ cpu->signalSwitched();
+ return;
+ }
+
ROB_count[0]+= numInsts;
wbCycle = 0;
@@ -682,6 +688,7 @@ LWBackEnd<Impl>::tick()
assert(numInsts == instList.size());
assert(waitingInsts == waitingList.size());
assert(numWaitingMemOps == waitingMemOps.size());
+ assert(!switchedOut);
#endif
}
@@ -1441,11 +1448,23 @@ template <class Impl>
void
LWBackEnd<Impl>::switchOut()
{
+ switchPending = true;
+}
+
+template <class Impl>
+void
+LWBackEnd<Impl>::doSwitchOut()
+{
switchedOut = true;
+ switchPending = false;
// Need to get rid of all committed, non-speculative state and write it
// to memory/XC. In this case this is stores that have committed and not
// yet written back.
+ assert(robEmpty());
+ assert(!LSQ.hasStoresToWB());
+
LSQ.switchOut();
+
squash(0);
}