diff options
author | Steve Reinhardt <Steve.Reinhardt@amd.com> | 2008-11-10 14:10:28 -0800 |
---|---|---|
committer | Steve Reinhardt <Steve.Reinhardt@amd.com> | 2008-11-10 14:10:28 -0800 |
commit | 42bd460d7f91f4d0f76901a8d661d5fe6292b7f2 (patch) | |
tree | b249930d5b6b14f18e46e20410d5f502946631dc /src/mem/cache/mshr.hh | |
parent | c981b7ed50167a9598f6f8773ab78b47b81aa08a (diff) | |
download | gem5-42bd460d7f91f4d0f76901a8d661d5fe6292b7f2.tar.xz |
Cache: Refactor packet forwarding a bit.
Makes adding write-through operations easier.
Diffstat (limited to 'src/mem/cache/mshr.hh')
-rw-r--r-- | src/mem/cache/mshr.hh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mem/cache/mshr.hh b/src/mem/cache/mshr.hh index fdb0485cb..2ff1c2489 100644 --- a/src/mem/cache/mshr.hh +++ b/src/mem/cache/mshr.hh @@ -118,8 +118,8 @@ class MSHR : public Packet::SenderState, public Printable /** True if the request has been sent to the bus. */ bool inService; - /** True if we will be putting the returned block in the cache */ - bool isCacheFill; + /** True if the request is just a simple forward from an upper level */ + bool isForward; /** True if we need to get an exclusive copy of the block. */ bool needsExclusive() const { return targets->needsExclusive; } @@ -200,7 +200,7 @@ public: * Returns the current number of allocated targets. * @return The current number of allocated targets. */ - int getNumTargets() { return ntargets; } + int getNumTargets() const { return ntargets; } /** * Returns a pointer to the target list. @@ -212,13 +212,17 @@ public: * Returns true if there are targets left. * @return true if there are targets */ - bool hasTargets() { return !targets->empty(); } + bool hasTargets() const { return !targets->empty(); } /** * Returns a reference to the first target. * @return A pointer to the first target. */ - Target *getTarget() { assert(hasTargets()); return &targets->front(); } + Target *getTarget() const + { + assert(hasTargets()); + return &targets->front(); + } /** * Pop first target. @@ -229,7 +233,7 @@ public: targets->pop_front(); } - bool isSimpleForward() + bool isForwardNoResponse() const { if (getNumTargets() != 1) return false; |