summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/cpu.hh
diff options
context:
space:
mode:
authorChristopher Torng <clt67@cornell.edu>2014-03-01 23:35:23 -0600
committerChristopher Torng <clt67@cornell.edu>2014-03-01 23:35:23 -0600
commit919baa603d0b835c3202f9968a617a31f9116549 (patch)
treee5e075957313bbe9a9630b84e64c86545351e264 /src/cpu/inorder/cpu.hh
parenta533f3f9831081625626f96f9434a00f3079e98e (diff)
downloadgem5-919baa603d0b835c3202f9968a617a31f9116549.tar.xz
cpu: Enable fast-forwarding for MIPS InOrderCPU and O3CPU
A copyRegs() function is added to MIPS utilities to copy architectural state from the old CPU to the new CPU during fast-forwarding. This addition alone enables fast-forwarding for the o3 cpu model running MIPS. The patch also adds takeOverFrom() and drainResume() functions to the InOrderCPU to enable it to take over from another CPU. This change enables fast-forwarding for the inorder cpu model running MIPS, but not for Alpha. Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Diffstat (limited to 'src/cpu/inorder/cpu.hh')
-rw-r--r--src/cpu/inorder/cpu.hh9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cpu/inorder/cpu.hh b/src/cpu/inorder/cpu.hh
index 1183f6fc9..0104cb95f 100644
--- a/src/cpu/inorder/cpu.hh
+++ b/src/cpu/inorder/cpu.hh
@@ -866,6 +866,15 @@ class InOrderCPU : public BaseCPU
Stats::Average instsPerCtxtSwitch;
Stats::Scalar numCtxtSwitches;
+ /** Resumes execution after a drain. */
+ void drainResume();
+
+ /** Switches out this CPU. */
+ virtual void switchOut();
+
+ /** Takes over from another CPU. */
+ virtual void takeOverFrom(BaseCPU *oldCPU);
+
/** Update Thread , used for statistic purposes*/
inline void tickThreadStats();