diff options
Diffstat (limited to 'src/cpu/o3/lsq_unit_impl.hh')
-rw-r--r-- | src/cpu/o3/lsq_unit_impl.hh | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/src/cpu/o3/lsq_unit_impl.hh b/src/cpu/o3/lsq_unit_impl.hh index a47528e32..d558e2dfa 100644 --- a/src/cpu/o3/lsq_unit_impl.hh +++ b/src/cpu/o3/lsq_unit_impl.hh @@ -57,6 +57,11 @@ LSQUnit<Impl>::WritebackEvent::process() if (!lsqPtr->isSwitchedOut()) { lsqPtr->writeback(inst, pkt); } + + if (pkt->senderState) + delete pkt->senderState; + + delete pkt->req; delete pkt; } @@ -80,10 +85,6 @@ LSQUnit<Impl>::completeDataAccess(PacketPtr pkt) if (isSwitchedOut() || inst->isSquashed()) { iewStage->decrWb(inst->seqNum); - delete state; - delete pkt->req; - delete pkt; - return; } else { if (!state->noWB) { writeback(inst, pkt); @@ -109,10 +110,13 @@ LSQUnit<Impl>::LSQUnit() template<class Impl> void -LSQUnit<Impl>::init(Params *params, LSQ *lsq_ptr, unsigned maxLQEntries, - unsigned maxSQEntries, unsigned id) +LSQUnit<Impl>::init(O3CPU *cpu_ptr, IEW *iew_ptr, Params *params, LSQ *lsq_ptr, + unsigned maxLQEntries, unsigned maxSQEntries, unsigned id) { -// DPRINTF(LSQUnit, "Creating LSQUnit%i object.\n",id); + cpu = cpu_ptr; + iewStage = iew_ptr; + + DPRINTF(LSQUnit, "Creating LSQUnit%i object.\n",id); switchedOut = false; @@ -141,19 +145,6 @@ LSQUnit<Impl>::init(Params *params, LSQ *lsq_ptr, unsigned maxLQEntries, } template<class Impl> -void -LSQUnit<Impl>::setCPU(O3CPU *cpu_ptr) -{ - cpu = cpu_ptr; - -#if USE_CHECKER - if (cpu->checker) { - cpu->checker->setDcachePort(dcachePort); - } -#endif -} - -template<class Impl> std::string LSQUnit<Impl>::name() const { @@ -211,6 +202,19 @@ LSQUnit<Impl>::regStats() template<class Impl> void +LSQUnit<Impl>::setDcachePort(Port *dcache_port) +{ + dcachePort = dcache_port; + +#if USE_CHECKER + if (cpu->checker) { + cpu->checker->setDcachePort(dcachePort); + } +#endif +} + +template<class Impl> +void LSQUnit<Impl>::clearLQ() { loadQueue.clear(); |