summaryrefslogtreecommitdiff
path: root/src/cpu/o3
diff options
context:
space:
mode:
authorGiacomo Travaglini <giacomo.travaglini@arm.com>2019-06-28 10:04:43 +0100
committerGiacomo Travaglini <giacomo.travaglini@arm.com>2019-07-16 13:16:42 +0000
commit34e77161fb42847797338ffe95674f248798ab43 (patch)
treef9d097e30ed18bc358eb7f8c647eaefc590d6341 /src/cpu/o3
parent9af53ddaec43653d915649173660dc5c71f06a72 (diff)
downloadgem5-34e77161fb42847797338ffe95674f248798ab43.tar.xz
cpu: isDrained renamed to isCpuDrained
cpu models inheriting from BaseCPU implement a draining checker called isDrained. This hides the base Drainable::isDrained method and might create confusion in the reader. This patch is renaming it to isCpuDrained in order to avoid any ambiguity Change-Id: Ie5221da6a4673432c2403996e42d451cae960bbf Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19468 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/cpu/o3')
-rw-r--r--src/cpu/o3/cpu.cc10
-rw-r--r--src/cpu/o3/cpu.hh2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index f2e0f60b7..920bef02c 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -1022,7 +1022,7 @@ FullO3CPU<Impl>::drain()
// Wake the CPU and record activity so everything can drain out if
// the CPU was not able to immediately drain.
- if (!isDrained()) {
+ if (!isCpuDrained()) {
// If a thread is suspended, wake it up so it can be drained
for (auto t : threadContexts) {
if (t->status() == ThreadContext::Suspended){
@@ -1048,7 +1048,7 @@ FullO3CPU<Impl>::drain()
// Flush out any old data from the time buffers. In
// particular, there might be some data in flight from the
// fetch stage that isn't visible in any of the CPU buffers we
- // test in isDrained().
+ // test in isCpuDrained().
for (int i = 0; i < timeBuffer.getSize(); ++i) {
timeBuffer.advance();
fetchQueue.advance();
@@ -1066,7 +1066,7 @@ template <class Impl>
bool
FullO3CPU<Impl>::tryDrain()
{
- if (drainState() != DrainState::Draining || !isDrained())
+ if (drainState() != DrainState::Draining || !isCpuDrained())
return false;
if (tickEvent.scheduled())
@@ -1082,7 +1082,7 @@ template <class Impl>
void
FullO3CPU<Impl>::drainSanityCheck() const
{
- assert(isDrained());
+ assert(isCpuDrained());
fetch.drainSanityCheck();
decode.drainSanityCheck();
rename.drainSanityCheck();
@@ -1092,7 +1092,7 @@ FullO3CPU<Impl>::drainSanityCheck() const
template <class Impl>
bool
-FullO3CPU<Impl>::isDrained() const
+FullO3CPU<Impl>::isCpuDrained() const
{
bool drained(true);
diff --git a/src/cpu/o3/cpu.hh b/src/cpu/o3/cpu.hh
index db8fca20a..68ad95b18 100644
--- a/src/cpu/o3/cpu.hh
+++ b/src/cpu/o3/cpu.hh
@@ -248,7 +248,7 @@ class FullO3CPU : public BaseO3CPU
void drainSanityCheck() const;
/** Check if a system is in a drained state. */
- bool isDrained() const;
+ bool isCpuDrained() const;
public:
/** Constructs a CPU with the given parameters. */