46#ifndef __MEM_CACHE_CACHE_HH__
47#define __MEM_CACHE_CACHE_HH__
50#include <unordered_set>
92 Tick request_time)
override;
96 Tick request_time)
override;
119 bool deferred_response =
false,
120 bool pending_downgrade =
false)
override;
123 bool already_copied,
bool pending_inval);
138 bool is_timing,
bool is_deferred,
bool pending_inval);
152 bool is_whole_line_write)
const override;
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
A coherent cache that can be arranged in flexible topologies.
PacketPtr cleanEvictBlk(CacheBlk *blk)
Create a CleanEvict request for the given block.
Cache(const CacheParams &p)
Instantiates a basic cache object.
void recvTimingSnoopReq(PacketPtr pkt) override
Snoops bus transactions to maintain coherence.
bool isCachedAbove(PacketPtr pkt, bool is_timing=true)
Send up a snoop request and find cached copies.
void promoteWholeLineWrites(PacketPtr pkt)
Turn line-sized writes into WriteInvalidate transactions.
void serviceMSHRTargets(MSHR *mshr, const PacketPtr pkt, CacheBlk *blk) override
Service non-deferred MSHR targets using the received response.
Cycles handleAtomicReqMiss(PacketPtr pkt, CacheBlk *&blk, PacketList &writebacks) override
Handle a request in atomic mode that missed in this cache.
Tick recvAtomicSnoop(PacketPtr pkt) override
Snoop for the provided request in the cache and return the estimated time taken.
std::unordered_set< RequestPtr > outstandingSnoop
Store the outstanding requests that we are expecting snoop responses from so we can determine which s...
void satisfyRequest(PacketPtr pkt, CacheBlk *blk, bool deferred_response=false, bool pending_downgrade=false) override
Perform any necessary updates to the block and perform any data exchange between the packet and the b...
void recvTimingSnoopResp(PacketPtr pkt) override
Handle a snoop response.
void recvTimingReq(PacketPtr pkt) override
Performs the access specified by the request.
Tick recvAtomic(PacketPtr pkt) override
Performs the access specified by the request.
void handleTimingReqMiss(PacketPtr pkt, CacheBlk *blk, Tick forward_time, Tick request_time) override
bool sendMSHRQueuePacket(MSHR *mshr) override
Take an MSHR, turn it into a suitable downstream packet, and send it out.
void doTimingSupplyResponse(PacketPtr req_pkt, const uint8_t *blk_data, bool already_copied, bool pending_inval)
PacketPtr createMissPacket(PacketPtr cpu_pkt, CacheBlk *blk, bool needs_writable, bool is_whole_line_write) const override
Create an appropriate downstream bus request packet.
void handleTimingReqHit(PacketPtr pkt, CacheBlk *blk, Tick request_time) override
uint32_t handleSnoop(PacketPtr pkt, CacheBlk *blk, bool is_timing, bool is_deferred, bool pending_inval)
Perform an upward snoop if needed, and update the block state (possibly invalidating the block).
PacketPtr evictBlock(CacheBlk *blk) override
Evict a cache block.
const bool doFastWrites
This cache should allocate a block on a line-sized write miss.
void doWritebacks(PacketList &writebacks, Tick forward_time) override
Insert writebacks into the write buffer.
bool access(PacketPtr pkt, CacheBlk *&blk, Cycles &lat, PacketList &writebacks) override
Does all the processing necessary to perform the provided request.
void doWritebacksAtomic(PacketList &writebacks) override
Send writebacks down the memory hierarchy in atomic mode.
Cycles is a wrapper class for representing cycle counts, i.e.
Miss Status and handling Register.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Declares a basic cache interface BaseCache.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Tick
Tick count type.
Declaration of the Packet class.