mem-cache: decoupled prefetchers from cache

This patches decouples the prefetchers from the cache implementation
as the first step to allow using the classic prefetchers with ruby
caches. The prefetchers that need do cache lookups can do so using
the accessor object provided when the probes are notified. This may
also facilitate connecting the same prefetcher to multiple caches.

Related JIRA:
https://gem5.atlassian.net/browse/GEM5-457
https://gem5.atlassian.net/browse/GEM5-1112

Change-Id: I4fee1a3613ae009fabf45d7b747e4582cad315ef
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
This commit is contained in:
Tiago Mück
2023-10-20 18:03:56 -05:00
parent 06bf783a85
commit af2ee0db30
34 changed files with 332 additions and 175 deletions

View File

@@ -66,7 +66,8 @@ IrregularStreamBuffer::IrregularStreamBuffer(
void
IrregularStreamBuffer::calculatePrefetch(const PrefetchInfo &pfi,
std::vector<AddrPriority> &addresses)
std::vector<AddrPriority> &addresses,
const CacheAccessor &cache)
{
// This prefetcher requires a PC
if (!pfi.hasPC()) {