from m5.objects.O3Checker import O3Checker
from m5.objects.BranchPredictor import *
-class FetchPolicy(ScopedEnum):
- vals = [ 'SingleThread', 'RoundRobin', 'Branch', 'IQCount', 'LSQCount' ]
+class SMTFetchPolicy(ScopedEnum):
+ vals = [ 'RoundRobin', 'Branch', 'IQCount', 'LSQCount' ]
class SMTQueuePolicy(ScopedEnum):
vals = [ 'Dynamic', 'Partitioned', 'Threshold' ]
numROBEntries = Param.Unsigned(192, "Number of reorder buffer entries")
smtNumFetchingThreads = Param.Unsigned(1, "SMT Number of Fetching Threads")
- smtFetchPolicy = Param.FetchPolicy('SingleThread', "SMT Fetch policy")
+ smtFetchPolicy = Param.SMTFetchPolicy('RoundRobin', "SMT Fetch policy")
smtLSQPolicy = Param.SMTQueuePolicy('Partitioned',
"SMT LSQ Sharing Policy")
smtLSQThreshold = Param.Int(100, "SMT LSQ Threshold Sharing Parameter")
numThreads = actual_num_threads;
- if (actual_num_threads > 1 && smtFetchPolicy == FetchPolicy::SingleThread)
- smtFetchPolicy = FetchPolicy::RoundRobin;
-
return new DerivO3CPU(this);
}
#include "cpu/pred/bpred_unit.hh"
#include "cpu/timebuf.hh"
#include "cpu/translation.hh"
-#include "enums/FetchPolicy.hh"
+#include "enums/SMTFetchPolicy.hh"
#include "mem/packet.hh"
#include "mem/port.hh"
#include "sim/eventq.hh"
ThreadStatus fetchStatus[Impl::MaxThreads];
/** Fetch policy. */
- FetchPolicy fetchPolicy;
+ SMTFetchPolicy fetchPolicy;
/** List that has the threads organized by priority. */
std::list<ThreadID> priorityList;
fatal("cache block (%u bytes) is not a multiple of the "
"fetch buffer (%u bytes)\n", cacheBlkSize, fetchBufferSize);
- // Figure out fetch policy
- panic_if(fetchPolicy == FetchPolicy::SingleThread && numThreads > 1,
- "Invalid Fetch Policy for a SMT workload.");
-
// Get the size of an instruction.
instSize = sizeof(TheISA::MachInst);
{
if (numThreads > 1) {
switch (fetchPolicy) {
- case FetchPolicy::RoundRobin:
+ case SMTFetchPolicy::RoundRobin:
return roundRobin();
- case FetchPolicy::IQCount:
+ case SMTFetchPolicy::IQCount:
return iqCount();
- case FetchPolicy::LSQCount:
+ case SMTFetchPolicy::LSQCount:
return lsqCount();
- case FetchPolicy::Branch:
+ case SMTFetchPolicy::Branch:
return branchCount();
default:
return InvalidThreadID;