Go to the documentation of this file.
54 #include "debug/Cache.hh"
57 #include "params/NoncoherentCache.hh"
66 assert(
p.replacement_policy);
100 while (!writebacks.empty()) {
103 writebacks.pop_front();
110 while (!writebacks.empty()) {
113 writebacks.pop_front();
120 Tick forward_time,
Tick request_time)
129 assert(mshr || !blk || !blk->
isValid());
141 "Should only see read and writes at non-coherent cache\n");
149 bool is_whole_line_write)
const
156 assert(!blk || !blk->
isValid());
184 assert(bus_pkt->
isRead());
195 DPRINTF(
Cache,
"Block for addr %#llx being updated in Cache\n",
226 "Should only see read and writes at non-coherent cache\n");
235 panic_if(!from_cpu_side,
"Non-coherent cache received functional snoop"
248 bool from_core =
false;
249 bool from_pref =
false;
252 for (
auto &target: targets) {
253 Packet *tgt_pkt = target.pkt;
255 switch (target.source) {
262 Tick completion_time;
272 if (transfer_offset < 0) {
284 completion_time - target.recvTime;
310 panic(
"Illegal target->source enum %d\n", target.source);
314 if (blk && !from_core && from_pref) {
Addr getBlockAddr(unsigned int blk_size) const
Tick recvAtomic(PacketPtr pkt) override
Performs the access specified by the request.
Miss Status and handling Register.
void recvTimingResp(PacketPtr pkt) override
Handles a response (cache line fill/write ack) from the bus.
void recvTimingReq(PacketPtr pkt) override
Performs the access specified by the request.
virtual void handleTimingReqMiss(PacketPtr pkt, CacheBlk *blk, Tick forward_time, Tick request_time)=0
void serviceMSHRTargets(MSHR *mshr, const PacketPtr pkt, CacheBlk *blk) override
Service non-deferred MSHR targets using the received response.
void invalidateBlock(CacheBlk *blk)
Invalidate a cache block.
Addr getOffset(unsigned int blk_size) const
virtual bool access(PacketPtr pkt, CacheBlk *&blk, Cycles &lat, PacketList &writebacks)
Does all the processing necessary to perform the provided request.
NoncoherentCache(const NoncoherentCacheParams &p)
virtual void recvTimingResp(PacketPtr pkt)
Handles a response (cache line fill/write ack) from the bus.
RequestPtr req
A pointer to the original request.
Tick sendAtomic(PacketPtr pkt)
Send an atomic request packet, where the data is moved and the state is updated in zero time,...
void doWritebacks(PacketList &writebacks, Tick forward_time) override
Insert writebacks into the write buffer.
Cycles handleAtomicReqMiss(PacketPtr pkt, CacheBlk *&blk, PacketList &writebacks) override
Handle a request in atomic mode that missed in this cache.
bool cacheResponding() const
void copyError(Packet *pkt)
PacketPtr createMissPacket(PacketPtr cpu_pkt, CacheBlk *blk, bool needs_writable, bool is_whole_line_write) const override
Create an appropriate downstream bus request packet.
bool access(PacketPtr pkt, CacheBlk *&blk, Cycles &lat, PacketList &writebacks) override
Does all the processing necessary to perform the provided request.
void makeAtomicResponse()
@ WritableBit
write permission
uint32_t headerDelay
The extra delay from seeing the packet until the header is transmitted.
void setPrefetched()
Marks this blocks as a recently prefetched block.
PacketPtr pkt
Pending request packet.
Cycles is a wrapper class for representing cycle counts, i.e.
uint32_t payloadDelay
The extra pipelining delay from seeing the packet until the end of payload is transmitted by the comp...
PacketPtr evictBlock(CacheBlk *blk) override
Evict a cache block.
RequestorID maxRequestors()
Get the number of requestors registered in the system.
void allocateWriteBuffer(PacketPtr pkt, Tick time)
void print(std::ostream &o, int verbosity=0, const std::string &prefix="") const
gem5::BaseCache::CacheStats stats
void functionalAccess(PacketPtr pkt, bool from_cpu_side) override
Performs the access specified by the request.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
ProbePointArg< PacketInfo > Packet
Packet probe point.
const unsigned blkSize
Block size of this cache.
uint64_t Tick
Tick count type.
virtual Tick recvAtomic(PacketPtr pkt)
Performs the access specified by the request.
void setCoherenceBits(unsigned bits)
Sets the corresponding coherence bits.
Entry * findMatch(Addr blk_addr, bool is_secure, bool ignore_uncacheable=true) const
Find the first entry that matches the provided address.
statistics::Vector missLatency
Total number of ticks per thread/command spent waiting for a miss.
bool allocOnFill(MemCmd cmd) const
Determine whether we should allocate on a fill or not.
MemCmd cmd
The command field of the packet.
bool needsResponse() const
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
@ DirtyBit
dirty (modified)
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...
virtual void recvTimingReq(PacketPtr pkt)
Performs the access specified by the request.
A coherent cache that can be arranged in flexible topologies.
void maintainClusivity(bool from_cache, CacheBlk *blk)
Maintain the clusivity of this cache by potentially invalidating a block.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
void makeTimingResponse()
void allocate()
Allocate memory for the packet.
CacheCmdStats & cmdStats(const PacketPtr p)
int getNumTargets() const
Returns the current number of allocated targets.
System * system
System we are currently operating in.
MSHRQueue mshrQueue
Miss status registers.
const bool writebackClean
Determine if clean lines should be written back or not.
bool isSet(unsigned bits) const
Checks the given coherence bits are set.
TargetList extractServiceableTargets(PacketPtr pkt)
Extracts the subset of the targets that can be serviced given a received response.
Cycles ticksToCycles(Tick t) const
void doWritebacksAtomic(PacketList &writebacks) override
Send writebacks down the memory hierarchy in atomic mode.
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 schedTimingResp(PacketPtr pkt, Tick when)
Schedule the sending of a timing response.
virtual void functionalAccess(PacketPtr pkt, bool from_cpu_side)
Performs the access specified by the request.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
void handleTimingReqMiss(PacketPtr pkt, CacheBlk *blk, Tick forward_time, Tick request_time) override
QueueEntry::Target * getTarget() override
Returns a reference to the first target.
CacheBlk * handleFill(PacketPtr pkt, CacheBlk *blk, PacketList &writebacks, bool allocate)
Handle a fill operation caused by a received packet.
bool isWholeLineWrite(unsigned blk_size)
PacketPtr writebackBlk(CacheBlk *blk)
Create a writeback request for the given block.
virtual bool isValid() const
Checks if the entry is valid.
bool isInvalidate() const
#define panic(...)
This implements a cprintf based panic() function.
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...
const Cycles responseLatency
The latency of sending reponse to its upper level cache/core on a linefill.
Generated on Sun Jul 30 2023 01:56:57 for gem5 by doxygen 1.8.17