.name(name() + ".predictedNotTakenIncorrect")
.desc("Number of Branches Incorrectly Predicted As Not Taken).");
+ lastExecuteCycle = curTick;
+
+ cyclesExecuted
+ .name(name() + ".cyclesExecuted")
+ .desc("Number of Cycles Execution Unit was used.");
+
+ utilization
+ .name(name() + ".utilization")
+ .desc("Utilization of Execution Unit (cycles / totalCycles).");
+ utilization = cyclesExecuted / cpu->numCycles;
+
Resource::regStats();
}
{
case ExecuteInst:
{
+ if (curTick != lastExecuteCycle) {
+ lastExecuteCycle = curTick;
+ cyclesExecuted++;
+ }
+
+
if (inst->isMemRef()) {
panic("%s not configured to handle memory ops.\n", resName);
} else if (inst->isControl()) {
/////////////////////////////////////////////////////////////////
Stats::Scalar predictedTakenIncorrect;
Stats::Scalar predictedNotTakenIncorrect;
+
+ Stats::Scalar cyclesExecuted;
+ Tick lastExecuteCycle;
+
+ Stats::Formula utilization;
};