diff options
author | Kevin Lim <ktlim@umich.edu> | 2006-11-07 13:53:06 -0500 |
---|---|---|
committer | Kevin Lim <ktlim@umich.edu> | 2006-11-07 13:53:06 -0500 |
commit | d9f159a3b996b25683f33bcc8ae5142311639722 (patch) | |
tree | 1475813fd82c0544e7cedcd479fd5ab276bdd72f /src/cpu/o3 | |
parent | bf3223d7ce681db8ca59dac49c6b44b672012e5d (diff) | |
download | gem5-d9f159a3b996b25683f33bcc8ae5142311639722.tar.xz |
Initialize mem dep unit properly.
src/cpu/o3/mem_dep_unit_impl.hh:
Initialize mem dep unit properly, add debug output.
--HG--
extra : convert_revision : 3c56dedfa57de1edc4b1c8f8d9bc94e18002eff2
Diffstat (limited to 'src/cpu/o3')
-rw-r--r-- | src/cpu/o3/mem_dep_unit.hh | 2 | ||||
-rw-r--r-- | src/cpu/o3/mem_dep_unit_impl.hh | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/cpu/o3/mem_dep_unit.hh b/src/cpu/o3/mem_dep_unit.hh index e399f0133..a12a3001b 100644 --- a/src/cpu/o3/mem_dep_unit.hh +++ b/src/cpu/o3/mem_dep_unit.hh @@ -69,7 +69,7 @@ class MemDepUnit { typedef typename Impl::DynInstPtr DynInstPtr; /** Empty constructor. Must call init() prior to using in this case. */ - MemDepUnit() {} + MemDepUnit(); /** Constructs a MemDepUnit with given parameters. */ MemDepUnit(Params *params); diff --git a/src/cpu/o3/mem_dep_unit_impl.hh b/src/cpu/o3/mem_dep_unit_impl.hh index c649ca385..f19980fd5 100644 --- a/src/cpu/o3/mem_dep_unit_impl.hh +++ b/src/cpu/o3/mem_dep_unit_impl.hh @@ -34,6 +34,13 @@ #include "cpu/o3/mem_dep_unit.hh" template <class MemDepPred, class Impl> +MemDepUnit<MemDepPred, Impl>::MemDepUnit() + : loadBarrier(false), loadBarrierSN(0), storeBarrier(false), + storeBarrierSN(0), iqPtr(NULL) +{ +} + +template <class MemDepPred, class Impl> MemDepUnit<MemDepPred, Impl>::MemDepUnit(Params *params) : depPred(params->SSITSize, params->LFSTSize), loadBarrier(false), loadBarrierSN(0), storeBarrier(false), storeBarrierSN(0), iqPtr(NULL) @@ -160,8 +167,12 @@ MemDepUnit<MemDepPred, Impl>::insert(DynInstPtr &inst) // producing memrefs/stores. InstSeqNum producing_store; if (inst->isLoad() && loadBarrier) { + DPRINTF(MemDepUnit, "Load barrier [sn:%lli] in flight\n", + loadBarrierSN); producing_store = loadBarrierSN; } else if (inst->isStore() && storeBarrier) { + DPRINTF(MemDepUnit, "Store barrier [sn:%lli] in flight\n", + storeBarrierSN); producing_store = storeBarrierSN; } else { producing_store = depPred.checkInst(inst->readPC()); @@ -171,10 +182,12 @@ MemDepUnit<MemDepPred, Impl>::insert(DynInstPtr &inst) // If there is a producing store, try to find the entry. if (producing_store != 0) { + DPRINTF(MemDepUnit, "Searching for producer\n"); MemDepHashIt hash_it = memDepHash.find(producing_store); if (hash_it != memDepHash.end()) { store_entry = (*hash_it).second; + DPRINTF(MemDepUnit, "Proucer found\n"); } } |