diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-04-04 20:50:49 +0000 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-04-04 20:50:49 +0000 |
commit | a664017c2a839279f8b8eea1076bba47d1863b88 (patch) | |
tree | ac302402f02133b6fda91ced93da52aaa8a8a3e8 /src/cpu/o3/lsq_unit_impl.hh | |
parent | 10fe8b05dbf38acff65d95a696cad95a45bf2e16 (diff) | |
parent | 3d2a434e42b10ef30bbb590722e72ed104be669a (diff) | |
download | gem5-a664017c2a839279f8b8eea1076bba47d1863b88.tar.xz |
Merge zizzer.eecs.umich.edu:/bk/newmem
into ahchoo.blinky.homelinux.org:/home/gblack/m5/newmem-o3-spec
--HG--
extra : convert_revision : 81269f094834f43b4e908321bfce2e031b39d2a4
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(); |