diff options
author | Lisa Hsu <hsul@eecs.umich.edu> | 2006-12-15 13:06:37 -0500 |
---|---|---|
committer | Lisa Hsu <hsul@eecs.umich.edu> | 2006-12-15 13:06:37 -0500 |
commit | b93b32ec3395971631467cb6116e278f6f205c90 (patch) | |
tree | 194d336cdf736a7972c7fe4b36803a45d48a9a62 /src/mem/cache/miss/blocking_buffer.hh | |
parent | 573d59441e420f02fd7cf3e31158258f5eee3ab1 (diff) | |
parent | 98bb1c62b31e988f81d9fc03cf14aca25fd008db (diff) | |
download | gem5-b93b32ec3395971631467cb6116e278f6f205c90.tar.xz |
Merge zizzer:/bk/sparcfs
into zed.eecs.umich.edu:/z/hsul/work/m5/newmem
--HG--
extra : convert_revision : 92a865a90a7c3e251ed1443f79640f761b359c1d
Diffstat (limited to 'src/mem/cache/miss/blocking_buffer.hh')
-rw-r--r-- | src/mem/cache/miss/blocking_buffer.hh | 61 |
1 files changed, 6 insertions, 55 deletions
diff --git a/src/mem/cache/miss/blocking_buffer.hh b/src/mem/cache/miss/blocking_buffer.hh index 934a843a6..205068a8c 100644 --- a/src/mem/cache/miss/blocking_buffer.hh +++ b/src/mem/cache/miss/blocking_buffer.hh @@ -38,16 +38,14 @@ #include <vector> +#include "base/misc.hh" // for fatal() +#include "mem/cache/miss/miss_buffer.hh" #include "mem/cache/miss/mshr.hh" -#include "base/statistics.hh" - -class BaseCache; -class BasePrefetcher; /** * Miss and writeback storage for a blocking cache. */ -class BlockingBuffer +class BlockingBuffer : public MissBuffer { protected: /** Miss storage. */ @@ -55,38 +53,13 @@ protected: /** WB storage. */ MSHR wb; - //Params - - /** Allocate on write misses. */ - const bool writeAllocate; - - /** Pointer to the parent cache. */ - BaseCache* cache; - - BasePrefetcher* prefetcher; - - /** Block size of the parent cache. */ - int blkSize; - - // Statistics - /** - * @addtogroup CacheStatistics - * @{ - */ - /** Number of blocks written back per thread. */ - Stats::Vector<> writebacks; - - /** - * @} - */ - public: /** * Builds and initializes this buffer. * @param write_allocate If true, treat write misses the same as reads. */ BlockingBuffer(bool write_allocate) - : writeAllocate(write_allocate) + : MissBuffer(write_allocate) { } @@ -97,14 +70,6 @@ public: void regStats(const std::string &name); /** - * Called by the parent cache to set the back pointer. - * @param _cache A pointer to the parent cache. - */ - void setCache(BaseCache *_cache); - - void setPrefetcher(BasePrefetcher *_prefetcher); - - /** * Handle a cache miss properly. Requests the bus and marks the cache as * blocked. * @param pkt The request that missed in the cache. @@ -183,12 +148,7 @@ public: * @param asid The address space id. * @return A pointer to miss if it matches. */ - MSHR* findMSHR(Addr addr) - { - if (miss.addr == addr && miss.pkt) - return &miss; - return NULL; - } + MSHR* findMSHR(Addr addr); /** * Searches for the supplied address in the write buffer. @@ -197,16 +157,7 @@ public: * @param writes List of pointers to the matching writes. * @return True if there is a matching write. */ - bool findWrites(Addr addr, std::vector<MSHR*>& writes) - { - if (wb.addr == addr && wb.pkt) { - writes.push_back(&wb); - return true; - } - return false; - } - - + bool findWrites(Addr addr, std::vector<MSHR*>& writes); /** * Perform a writeback of dirty data to the given address. |