diff options
author | Mitch Hayenga <mitch.hayenga@arm.com> | 2014-10-29 23:18:26 -0500 |
---|---|---|
committer | Mitch Hayenga <mitch.hayenga@arm.com> | 2014-10-29 23:18:26 -0500 |
commit | 6847bbf7cefcebfeed6ec29fa139efcb3ce20be4 (patch) | |
tree | 1c27673aef935e5c52f24b8aa171aa87541d918d /src/cpu/o3/mem_dep_unit_impl.hh | |
parent | b31d9e93e2744b044d7ccc2d9113bc367038e14f (diff) | |
download | gem5-6847bbf7cefcebfeed6ec29fa139efcb3ce20be4.tar.xz |
cpu: Add drain check functionality to IEW
IEW did not check the instQueue and memDepUnit to ensure
they were drained. This caused issues when drainSanityCheck()
did check those structures after asserting IEW was drained.
Diffstat (limited to 'src/cpu/o3/mem_dep_unit_impl.hh')
-rw-r--r-- | src/cpu/o3/mem_dep_unit_impl.hh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cpu/o3/mem_dep_unit_impl.hh b/src/cpu/o3/mem_dep_unit_impl.hh index 6684e4ff0..376198fc1 100644 --- a/src/cpu/o3/mem_dep_unit_impl.hh +++ b/src/cpu/o3/mem_dep_unit_impl.hh @@ -128,6 +128,19 @@ MemDepUnit<MemDepPred, Impl>::regStats() } template <class MemDepPred, class Impl> +bool +MemDepUnit<MemDepPred, Impl>::isDrained() const +{ + bool drained = instsToReplay.empty() + && memDepHash.empty() + && instsToReplay.empty(); + for (int i = 0; i < Impl::MaxThreads; ++i) + drained = drained && instList[i].empty(); + + return drained; +} + +template <class MemDepPred, class Impl> void MemDepUnit<MemDepPred, Impl>::drainSanityCheck() const { |