diff options
author | Kevin Lim <ktlim@umich.edu> | 2006-05-16 14:06:35 -0400 |
---|---|---|
committer | Kevin Lim <ktlim@umich.edu> | 2006-05-16 14:06:35 -0400 |
commit | ef6e2eb3c4dbf337df7380ae93360c13140f11f6 (patch) | |
tree | 9f7d6b6f3bb38733c2b15d500cc90229263f3afd /cpu/o3/fetch_impl.hh | |
parent | c23b23f4e7f9f0faec555cb282c899b77223a110 (diff) | |
download | gem5-ef6e2eb3c4dbf337df7380ae93360c13140f11f6.tar.xz |
Updates for sampler, checker, and general correctness.
cpu/o3/alpha_cpu.hh:
Update for sampler to work properly. Also code cleanup.
cpu/o3/alpha_cpu_builder.cc:
cpu/o3/alpha_dyn_inst.hh:
Updates to support the checker.
cpu/o3/alpha_cpu_impl.hh:
Updates to support the checker. Also general code cleanup.
cpu/o3/alpha_dyn_inst_impl.hh:
Code cleanup.
cpu/o3/alpha_params.hh:
Updates to support the checker. Also supports trap latencies set through the parameters.
cpu/o3/commit.hh:
Supports sampler, checker. Code cleanup.
cpu/o3/commit_impl.hh:
Updates to support the sampler and checker, as well as general code cleanup.
cpu/o3/cpu.cc:
cpu/o3/cpu.hh:
Support sampler and checker.
cpu/o3/decode_impl.hh:
Supports sampler.
cpu/o3/fetch.hh:
Supports sampler. Also update to hold the youngest valid SN fetch has seen to ensure that the entire pipeline has been drained.
cpu/o3/fetch_impl.hh:
Sampler updates. Also be sure to not fetches to uncached space (bad path).
cpu/o3/iew.hh:
cpu/o3/iew_impl.hh:
Sampler updates.
cpu/o3/lsq_unit_impl.hh:
Supports checker.
cpu/o3/regfile.hh:
No need for accessing xcProxies directly.
cpu/o3/rename.hh:
cpu/o3/rename_impl.hh:
Sampler support.
--HG--
extra : convert_revision : 03881885dd50ebbca13ef31f31492fd4ef59121c
Diffstat (limited to 'cpu/o3/fetch_impl.hh')
-rw-r--r-- | cpu/o3/fetch_impl.hh | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/cpu/o3/fetch_impl.hh b/cpu/o3/fetch_impl.hh index 92f923c65..b4ff69d89 100644 --- a/cpu/o3/fetch_impl.hh +++ b/cpu/o3/fetch_impl.hh @@ -372,6 +372,13 @@ void DefaultFetch<Impl>::switchOut() { switchedOut = true; + cpu->signalSwitched(); +} + +template <class Impl> +void +DefaultFetch<Impl>::doSwitchOut() +{ branchPred.switchOut(); } @@ -474,7 +481,7 @@ DefaultFetch<Impl>::fetchCacheLine(Addr fetch_PC, Fault &ret_fault, unsigned tid unsigned flags = 0; #endif // FULL_SYSTEM - if (interruptPending && flags == 0) { + if (interruptPending && flags == 0 || switchedOut) { // Hold off fetch from getting new instructions while an interrupt // is pending. return false; @@ -508,7 +515,8 @@ DefaultFetch<Impl>::fetchCacheLine(Addr fetch_PC, Fault &ret_fault, unsigned tid // instruction. if (fault == NoFault) { #if FULL_SYSTEM - if (cpu->system->memctrl->badaddr(memReq[tid]->paddr)) { + if (cpu->system->memctrl->badaddr(memReq[tid]->paddr) || + memReq[tid]->flags & UNCACHEABLE) { DPRINTF(Fetch, "Fetch: Bad address %#x (hopefully on a " "misspeculating path!", memReq[tid]->paddr); @@ -625,8 +633,8 @@ DefaultFetch<Impl>::doSquash(const Addr &new_PC, unsigned tid) template<class Impl> void DefaultFetch<Impl>::squashFromDecode(const Addr &new_PC, - const InstSeqNum &seq_num, - unsigned tid) + const InstSeqNum &seq_num, + unsigned tid) { DPRINTF(Fetch, "[tid:%i]: Squashing from decode.\n",tid); @@ -635,6 +643,7 @@ DefaultFetch<Impl>::squashFromDecode(const Addr &new_PC, // Tell the CPU to remove any instructions that are in flight between // fetch and decode. cpu->removeInstsUntil(seq_num, tid); + youngestSN = seq_num; } template<class Impl> @@ -820,6 +829,7 @@ DefaultFetch<Impl>::checkSignalsAndUpdate(unsigned tid) // In any case, squash. squash(fromCommit->commitInfo[tid].nextPC,tid); + youngestSN = fromCommit->commitInfo[tid].doneSeqNum; // Also check if there's a mispredict that happened. if (fromCommit->commitInfo[tid].branchMispredict) { @@ -999,6 +1009,8 @@ DefaultFetch<Impl>::fetch(bool &status_change) // Get a sequence number. inst_seq = cpu->getAndIncrementInstSeq(); + youngestSN = inst_seq; + // Make sure this is a valid index. assert(offset <= cacheBlkSize - instSize); |