Deleted Added
sdiff udiff text old ( 13948:f8666d4d5855 ) new ( 14035:60068a2d56e0 )
full compact
1/*
2 * Copyright (c) 2010-2018 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 66 unchanged lines hidden (view full) ---

75 // As this a non-coherent cache located below the point of
76 // coherency, we do not expect requests that are typically used to
77 // keep caches coherent (e.g., InvalidateReq or UpdateReq).
78 assert(pkt->isRead() || pkt->isWrite());
79 BaseCache::satisfyRequest(pkt, blk);
80}
81
82bool
83NoncoherentCache::access(PacketPtr pkt, CacheBlk *&blk, Cycles &lat)
84{
85 bool success = BaseCache::access(pkt, blk, lat);
86
87 if (pkt->isWriteback() || pkt->cmd == MemCmd::WriteClean) {
88 assert(blk && blk->isValid());
89 // Writeback and WriteClean can allocate and fill even if the
90 // referenced block was not present or it was invalid. If that
91 // is the case, make sure that the new block is marked as
92 // writable
93 blk->status |= BlkWritable;
94 }
95
96 return success;
97}
98
99void
100NoncoherentCache::doWritebacks(PacketPtr pkt, Tick forward_time)
101{
102 allocateWriteBuffer(pkt, forward_time);
103}
104
105void
106NoncoherentCache::doWritebacksAtomic(PacketPtr pkt)
107{
108 memSidePort.sendAtomic(pkt);
109 delete pkt;
110}
111
112void
113NoncoherentCache::handleTimingReqMiss(PacketPtr pkt, CacheBlk *blk,
114 Tick forward_time, Tick request_time)
115{
116 // miss
117 Addr blk_addr = pkt->getBlockAddr(blkSize);

--- 39 unchanged lines hidden (view full) ---

157 pkt->allocate();
158 DPRINTF(Cache, "%s created %s from %s\n", __func__, pkt->print(),
159 cpu_pkt->print());
160 return pkt;
161}
162
163
164Cycles
165NoncoherentCache::handleAtomicReqMiss(PacketPtr pkt, CacheBlk *&blk)
166{
167 PacketPtr bus_pkt = createMissPacket(pkt, blk, true,
168 pkt->isWholeLineWrite(blkSize));
169 DPRINTF(Cache, "Sending an atomic %s\n", bus_pkt->print());
170
171 Cycles latency = ticksToCycles(memSidePort.sendAtomic(bus_pkt));
172
173 assert(bus_pkt->isResponse());

--- 8 unchanged lines hidden (view full) ---

182 // We are now dealing with the response handling
183 DPRINTF(Cache, "Receive response: %s\n", bus_pkt->print());
184
185 if (!bus_pkt->isError()) {
186 // Any reponse that does not have an error should be filling,
187 // afterall it is a read response
188 DPRINTF(Cache, "Block for addr %#llx being updated in Cache\n",
189 bus_pkt->getAddr());
190 blk = handleFill(bus_pkt, blk, allocOnFill(bus_pkt->cmd));
191 assert(blk);
192 }
193 satisfyRequest(pkt, blk);
194
195 maintainClusivity(true, blk);
196
197 // Use the separate bus_pkt to generate response to pkt and
198 // then delete it.

--- 158 unchanged lines hidden ---