summaryrefslogtreecommitdiff
path: root/sim/pseudo_inst.cc
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-03-01 12:43:04 -0500
committerAli Saidi <saidi@eecs.umich.edu>2006-03-01 12:43:04 -0500
commit1624d9e5458fbd02d2e21c6d88f78769680b78b0 (patch)
tree925cf2497d6c440e2b764bb7bda4a049580c7481 /sim/pseudo_inst.cc
parent34da58a698e4119876f04d13c337e9974970f49a (diff)
parent26d7b5a4d1ee06ce314093facdbef6389ee1ec55 (diff)
downloadgem5-1624d9e5458fbd02d2e21c6d88f78769680b78b0.tar.xz
Merge zizzer:/bk/m5
into zeep.eecs.umich.edu:/z/saidi/work/m5.q --HG-- extra : convert_revision : 4855ecfb3de652456a8be413c9e538c91709dcb6
Diffstat (limited to 'sim/pseudo_inst.cc')
-rw-r--r--sim/pseudo_inst.cc38
1 files changed, 37 insertions, 1 deletions
diff --git a/sim/pseudo_inst.cc b/sim/pseudo_inst.cc
index 36c854d1c..3effef7ae 100644
--- a/sim/pseudo_inst.cc
+++ b/sim/pseudo_inst.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2005 The Regents of The University of Michigan
+ * Copyright (c) 2003-2006 The Regents of The University of Michigan
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -78,6 +78,42 @@ namespace AlphaPseudo
}
void
+ quiesceNs(ExecContext *xc, uint64_t ns)
+ {
+ if (!doQuiesce || ns == 0)
+ return;
+
+ if (xc->quiesceEvent.scheduled())
+ xc->quiesceEvent.reschedule(curTick + Clock::Int::ns * ns);
+ else
+ xc->quiesceEvent.schedule(curTick + Clock::Int::ns * ns);
+
+ xc->suspend();
+ xc->kernelStats->quiesce();
+ }
+
+ void
+ quiesceCycles(ExecContext *xc, uint64_t cycles)
+ {
+ if (!doQuiesce || cycles == 0)
+ return;
+
+ if (xc->quiesceEvent.scheduled())
+ xc->quiesceEvent.reschedule(curTick + xc->cpu->cycles(cycles));
+ else
+ xc->quiesceEvent.schedule(curTick + xc->cpu->cycles(cycles));
+
+ xc->suspend();
+ xc->kernelStats->quiesce();
+ }
+
+ uint64_t
+ quiesceTime(ExecContext *xc)
+ {
+ return (xc->lastActivate - xc->lastSuspend) / Clock::Int::ns ;
+ }
+
+ void
ivlb(ExecContext *xc)
{
xc->kernelStats->ivlb();