directToStage2(false), tableWalker(p->walker), stage2Tlb(NULL),
stage2Mmu(NULL), test(nullptr), rangeMRU(1),
aarch64(false), aarch64EL(EL0), isPriv(false), isSecure(false),
- isHyp(false), asid(0), vmid(0), dacr(0),
+ isHyp(false), asid(0), vmid(0), hcr(0), dacr(0),
miscRegValid(false), miscRegContext(0), curTranType(NormalTran)
{
const ArmSystem *sys = dynamic_cast<const ArmSystem *>(p->sys);
const StaticInstPtr &_macroop,
TheISA::PCState _pc, TheISA::PCState _predPC,
InstSeqNum seq_num, ImplCPU *cpu)
- : staticInst(_staticInst), cpu(cpu), traceData(NULL), macroop(_macroop)
+ : staticInst(_staticInst), cpu(cpu),
+ thread(nullptr),
+ traceData(nullptr),
+ macroop(_macroop),
+ memData(nullptr),
+ savedReq(nullptr),
+ savedSreqLow(nullptr),
+ savedSreqHigh(nullptr),
+ reqToVerify(nullptr)
{
seqNum = seq_num;
CheckerCPU::CheckerCPU(Params *p)
: BaseCPU(p, true), systemPtr(NULL), icachePort(NULL), dcachePort(NULL),
- tc(NULL), thread(NULL)
+ tc(NULL), thread(NULL),
+ unverifiedReq(nullptr),
+ unverifiedMemData(nullptr)
{
curStaticInst = NULL;
curMacroStaticInst = NULL;
"RoundRobin, OldestReady");
}
- for (ThreadID tid = 0; tid < numThreads; tid++) {
+ for (ThreadID tid = 0; tid < Impl::MaxThreads; tid++) {
commitStatus[tid] = Idle;
changedROBNumEntries[tid] = false;
- checkEmptyROB[tid] = false;
- trapInFlight[tid] = false;
- committedStores[tid] = false;
trapSquash[tid] = false;
tcSquash[tid] = false;
+ squashAfterInst[tid] = nullptr;
pc[tid].set(0);
+ youngestSeqNum[tid] = 0;
lastCommitedSeqNum[tid] = 0;
- squashAfterInst[tid] = NULL;
+ trapInFlight[tid] = false;
+ committedStores[tid] = false;
+ checkEmptyROB[tid] = false;
+ renameMap[tid] = nullptr;
}
interrupt = NoFault;
}
// @todo: Make into a parameter
skidBufferMax = (fetchToDecodeDelay + 1) * params->fetchWidth;
+ for (int tid = 0; tid < Impl::MaxThreads; tid++) {
+ stalls[tid] = {false};
+ decodeStatus[tid] = Idle;
+ bdelayDoneSeqNum[tid] = 0;
+ squashInst[tid] = nullptr;
+ squashAfterDelaySlot[tid] = 0;
+ }
}
template<class Impl>
public:
FinishTranslationEvent(DefaultFetch<Impl> *_fetch)
- : fetch(_fetch)
+ : fetch(_fetch), req(nullptr)
{}
void setFault(Fault _fault)
template<class Impl>
DefaultFetch<Impl>::DefaultFetch(O3CPU *_cpu, DerivO3CPUParams *params)
: cpu(_cpu),
+ branchPred(nullptr),
decodeToFetchDelay(params->decodeToFetchDelay),
renameToFetchDelay(params->renameToFetchDelay),
iewToFetchDelay(params->iewToFetchDelay),
instSize = sizeof(TheISA::MachInst);
for (int i = 0; i < Impl::MaxThreads; i++) {
- decoder[i] = NULL;
+ fetchStatus[i] = Idle;
+ decoder[i] = nullptr;
+ pc[i] = 0;
+ fetchOffset[i] = 0;
+ macroop[i] = nullptr;
+ delayedCommit[i] = false;
+ memReq[i] = nullptr;
+ stalls[i] = {false, false};
fetchBuffer[i] = NULL;
fetchBufferPC[i] = 0;
fetchBufferValid[i] = false;
+ lastIcacheStall[i] = 0;
+ issuePipelinedIfetch[i] = false;
}
branchPred = params->branchPred;
issueToExecuteDelay(params->issueToExecuteDelay),
dispatchWidth(params->dispatchWidth),
issueWidth(params->issueWidth),
+ wbNumInst(0),
+ wbCycle(0),
wbWidth(params->wbWidth),
numThreads(params->numThreads)
{
// Instruction queue needs the queue between issue and execute.
instQueue.setIssueToExecuteQueue(&issueToExecQueue);
- for (ThreadID tid = 0; tid < numThreads; tid++) {
+ for (ThreadID tid = 0; tid < Impl::MaxThreads; tid++) {
dispatchStatus[tid] = Running;
fetchRedirect[tid] = false;
}
regScoreboard.resize(numPhysRegs);
//Initialize Mem Dependence Units
- for (ThreadID tid = 0; tid < numThreads; tid++) {
+ for (ThreadID tid = 0; tid < Impl::MaxThreads; tid++) {
memDepUnit[tid].init(params, tid);
memDepUnit[tid].setIQ(this);
}
panic("Invalid IQ sharing policy. Options are: Dynamic, "
"Partitioned, Threshold");
}
+ for (ThreadID tid = numThreads; tid < Impl::MaxThreads; tid++) {
+ maxEntries[tid] = 0;
+ }
}
template <class Impl>
InstructionQueue<Impl>::resetState()
{
//Initialize thread IQ counts
- for (ThreadID tid = 0; tid <numThreads; tid++) {
+ for (ThreadID tid = 0; tid < Impl::MaxThreads; tid++) {
count[tid] = 0;
instList[tid].clear();
}
regScoreboard[i] = false;
}
- for (ThreadID tid = 0; tid < numThreads; ++tid) {
+ for (ThreadID tid = 0; tid < Impl::MaxThreads; ++tid) {
squashedSeqNum[tid] = 0;
}
// @todo: Make into a parameter.
skidBufferMax = (decodeToRenameDelay + 1) * params->decodeWidth;
+ for (uint32_t tid = 0; tid < Impl::MaxThreads; tid++) {
+ renameStatus[tid] = Idle;
+ renameMap[tid] = nullptr;
+ instsInProgress[tid] = 0;
+ loadsInProgress[tid] = 0;
+ storesInProgress[tid] = 0;
+ freeEntries[tid] = {0, 0, 0, 0};
+ emptyROB[tid] = true;
+ stalls[tid] = {false, false};
+ serializeInst[tid] = nullptr;
+ serializeOnNextInst[tid] = false;
+ }
}
template <class Impl>
panic("Invalid ROB sharing policy. Options are: Dynamic, "
"Partitioned, Threshold");
}
+ for (ThreadID tid = numThreads; tid < Impl::MaxThreads; tid++) {
+ maxEntries[tid] = 0;
+ }
resetState();
}
void
ROB<Impl>::resetState()
{
- for (ThreadID tid = 0; tid < numThreads; tid++) {
- doneSquashing[tid] = true;
+ for (ThreadID tid = 0; tid < Impl::MaxThreads; tid++) {
threadEntries[tid] = 0;
squashIt[tid] = instList[tid].end();
squashedSeqNum[tid] = 0;
+ doneSquashing[tid] = true;
}
numInstsInROB = 0;