Go to the documentation of this file.
54 #include "debug/Cache.hh"
57 #include "params/NoncoherentCache.hh"
95 while (!writebacks.empty()) {
98 writebacks.pop_front();
105 while (!writebacks.empty()) {
108 writebacks.pop_front();
115 Tick forward_time,
Tick request_time)
124 assert(mshr || !blk || !blk->
isValid());
136 "Should only see read and writes at non-coherent cache\n");
144 bool is_whole_line_write)
const
151 assert(!blk || !blk->
isValid());
179 assert(bus_pkt->
isRead());
190 DPRINTF(
Cache,
"Block for addr %#llx being updated in Cache\n",
221 "Should only see read and writes at non-coherent cache\n");
230 panic_if(!from_cpu_side,
"Non-coherent cache received functional snoop"
244 for (
auto &target: targets) {
245 Packet *tgt_pkt = target.pkt;
247 switch (target.source) {
252 Tick completion_time;
262 if (transfer_offset < 0) {
274 completion_time - target.recvTime;
301 panic(
"Illegal target->source enum %d\n", target.source);
352 NoncoherentCacheParams::create()
355 assert(replacement_policy);
void makeAtomicResponse()
void maintainClusivity(bool from_cache, CacheBlk *blk)
Maintain the clusivity of this cache by potentially invalidating a block.
void makeTimingResponse()
bool cacheResponding() const
virtual void functionalAccess(PacketPtr pkt, bool from_cpu_side)
Performs the access specified by the request.
M5_NODISCARD PacketPtr evictBlock(CacheBlk *blk) override
Evict a cache block.
CacheBlk * handleFill(PacketPtr pkt, CacheBlk *blk, PacketList &writebacks, bool allocate)
Handle a fill operation caused by a received packet.
PacketPtr writebackBlk(CacheBlk *blk)
Create a writeback request for the given block.
uint32_t payloadDelay
The extra pipelining delay from seeing the packet until the end of payload is transmitted by the comp...
System * system
System we are currently operating in.
int getNumTargets() const
Returns the current number of allocated targets.
const unsigned blkSize
Block size of this cache.
NoncoherentCache(const NoncoherentCacheParams *p)
Stats::Vector missLatency
Total number of cycles per thread/command spent waiting for a miss.
uint64_t Tick
Tick count type.
bool isInvalidate() const
RequestPtr req
A pointer to the original request.
void serviceMSHRTargets(MSHR *mshr, const PacketPtr pkt, CacheBlk *blk) override
Service non-deferred MSHR targets using the received response.
void schedTimingResp(PacketPtr pkt, Tick when)
Schedule the sending of a timing response.
bool access(PacketPtr pkt, CacheBlk *&blk, Cycles &lat, PacketList &writebacks) override
Does all the processing necessary to perform the provided request.
uint32_t headerDelay
The extra delay from seeing the packet until the header is transmitted.
TargetList extractServiceableTargets(PacketPtr pkt)
Extracts the subset of the targets that can be serviced given a received response.
void print(std::ostream &o, int verbosity=0, const std::string &prefix="") const
const PacketPtr pkt
Pending request packet.
void copyError(Packet *pkt)
void recvTimingReq(PacketPtr pkt) override
Performs the access specified by the request.
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...
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 allocateWriteBuffer(PacketPtr pkt, Tick time)
bool isWholeLineWrite(unsigned blk_size)
MSHRQueue mshrQueue
Miss status registers.
bool isDirty() const
Check to see if a block has been written.
bool allocOnFill(MemCmd cmd) const
Determine whether we should allocate on a fill or not.
BaseCache::CacheStats stats
Addr getBlockAddr(unsigned int blk_size) const
void invalidateBlock(CacheBlk *blk)
Invalidate a cache block.
bool needsResponse() const
virtual void recvTimingReq(PacketPtr pkt)
Performs the access specified by the request.
Tick clockEdge(Cycles cycles=Cycles(0)) const
Determine the tick when a cycle begins, by default the current one, but the argument also enables the...
State status
The current status of this block.
virtual bool access(PacketPtr pkt, CacheBlk *&blk, Cycles &lat, PacketList &writebacks)
Does all the processing necessary to perform the provided request.
Addr getOffset(unsigned int blk_size) const
Entry * findMatch(Addr blk_addr, bool is_secure, bool ignore_uncacheable=true) const
Find the first entry that matches the provided address.
@ BlkHWPrefetched
block was a hardware prefetch yet unaccessed
ProbePointArg< PacketInfo > Packet
Packet probe point.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
virtual void satisfyRequest(PacketPtr pkt, CacheBlk *blk, bool deferred_response=false, bool pending_downgrade=false)
Perform any necessary updates to the block and perform any data exchange between the packet and the b...
QueueEntry::Target * getTarget() override
Returns a reference to the first target.
void handleTimingReqMiss(PacketPtr pkt, CacheBlk *blk, Tick forward_time, Tick request_time) override
const bool writebackClean
Determine if clean lines should be written back or not.
MemCmd cmd
The command field of the packet.
bool isValid() const
Checks that a block is valid.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
@ BlkWritable
write permission
void recvTimingResp(PacketPtr pkt) override
Handles a response (cache line fill/write ack) from the bus.
void doWritebacksAtomic(PacketList &writebacks) override
Send writebacks down the memory hierarchy in atomic mode.
RequestorID maxRequestors()
Get the number of requestors registered in the system.
Cycles ticksToCycles(Tick t) const
virtual void handleTimingReqMiss(PacketPtr pkt, CacheBlk *blk, Tick forward_time, Tick request_time)=0
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void functionalAccess(PacketPtr pkt, bool from_cpu_side) override
Performs the access specified by the request.
Cycles is a wrapper class for representing cycle counts, i.e.
Cycles handleAtomicReqMiss(PacketPtr pkt, CacheBlk *&blk, PacketList &writebacks) override
Handle a request in atomic mode that missed in this cache.
const Cycles responseLatency
The latency of sending reponse to its upper level cache/core on a linefill.
void doWritebacks(PacketList &writebacks, Tick forward_time) override
Insert writebacks into the write buffer.
virtual void recvTimingResp(PacketPtr pkt)
Handles a response (cache line fill/write ack) from the bus.
Tick sendAtomic(PacketPtr pkt)
Send an atomic request packet, where the data is moved and the state is updated in zero time,...
void allocate()
Allocate memory for the packet.
A coherent cache that can be arranged in flexible topologies.
virtual Tick recvAtomic(PacketPtr pkt)
Performs the access specified by the request.
CacheCmdStats & cmdStats(const PacketPtr p)
#define panic(...)
This implements a cprintf based panic() function.
Miss Status and handling Register.
Tick recvAtomic(PacketPtr pkt) override
Performs the access specified by the request.
Generated on Wed Sep 30 2020 14:02:12 for gem5 by doxygen 1.8.17