base.cc (13752:135bb759ee9c) | base.cc (13765:7936e603ac0d) |
---|---|
1/* 2 * Copyright (c) 2012-2013, 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 --- 1051 unchanged lines hidden (view full) --- 1060 blk->status |= BlkWritable; 1061 } 1062 // nothing else to do; writeback doesn't expect response 1063 assert(!pkt->needsResponse()); 1064 pkt->writeDataToBlock(blk->data, blkSize); 1065 DPRINTF(Cache, "%s new state is %s\n", __func__, blk->print()); 1066 incHitCount(pkt); 1067 | 1/* 2 * Copyright (c) 2012-2013, 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 --- 1051 unchanged lines hidden (view full) --- 1060 blk->status |= BlkWritable; 1061 } 1062 // nothing else to do; writeback doesn't expect response 1063 assert(!pkt->needsResponse()); 1064 pkt->writeDataToBlock(blk->data, blkSize); 1065 DPRINTF(Cache, "%s new state is %s\n", __func__, blk->print()); 1066 incHitCount(pkt); 1067 |
1068 // A writeback searches for the block, then writes the data 1069 lat = calculateAccessLatency(blk, pkt->headerDelay, tag_latency); 1070 |
|
1068 // When the packet metadata arrives, the tag lookup will be done while 1069 // the payload is arriving. Then the block will be ready to access as 1070 // soon as the fill is done 1071 blk->setWhenReady(clockEdge(fillLatency) + pkt->headerDelay + 1072 std::max(cyclesToTicks(tag_latency), (uint64_t)pkt->payloadDelay)); 1073 | 1071 // When the packet metadata arrives, the tag lookup will be done while 1072 // the payload is arriving. Then the block will be ready to access as 1073 // soon as the fill is done 1074 blk->setWhenReady(clockEdge(fillLatency) + pkt->headerDelay + 1075 std::max(cyclesToTicks(tag_latency), (uint64_t)pkt->payloadDelay)); 1076 |
1074 // A writeback searches for the block, then writes the data 1075 lat = calculateAccessLatency(blk, pkt->headerDelay, tag_latency); 1076 | |
1077 return true; 1078 } else if (pkt->cmd == MemCmd::CleanEvict) { 1079 // A CleanEvict does not need to access the data array 1080 lat = calculateTagOnlyLatency(pkt->headerDelay, tag_latency); 1081 1082 if (blk) { 1083 // Found the block in the tags, need to stop CleanEvict from 1084 // propagating further down the hierarchy. Returning true will --- 53 unchanged lines hidden (view full) --- 1138 } 1139 // nothing else to do; writeback doesn't expect response 1140 assert(!pkt->needsResponse()); 1141 pkt->writeDataToBlock(blk->data, blkSize); 1142 DPRINTF(Cache, "%s new state is %s\n", __func__, blk->print()); 1143 1144 incHitCount(pkt); 1145 | 1077 return true; 1078 } else if (pkt->cmd == MemCmd::CleanEvict) { 1079 // A CleanEvict does not need to access the data array 1080 lat = calculateTagOnlyLatency(pkt->headerDelay, tag_latency); 1081 1082 if (blk) { 1083 // Found the block in the tags, need to stop CleanEvict from 1084 // propagating further down the hierarchy. Returning true will --- 53 unchanged lines hidden (view full) --- 1138 } 1139 // nothing else to do; writeback doesn't expect response 1140 assert(!pkt->needsResponse()); 1141 pkt->writeDataToBlock(blk->data, blkSize); 1142 DPRINTF(Cache, "%s new state is %s\n", __func__, blk->print()); 1143 1144 incHitCount(pkt); 1145 |
1146 // A writeback searches for the block, then writes the data 1147 lat = calculateAccessLatency(blk, pkt->headerDelay, tag_latency); 1148 |
|
1146 // When the packet metadata arrives, the tag lookup will be done while 1147 // the payload is arriving. Then the block will be ready to access as 1148 // soon as the fill is done 1149 blk->setWhenReady(clockEdge(fillLatency) + pkt->headerDelay + 1150 std::max(cyclesToTicks(tag_latency), (uint64_t)pkt->payloadDelay)); 1151 | 1149 // When the packet metadata arrives, the tag lookup will be done while 1150 // the payload is arriving. Then the block will be ready to access as 1151 // soon as the fill is done 1152 blk->setWhenReady(clockEdge(fillLatency) + pkt->headerDelay + 1153 std::max(cyclesToTicks(tag_latency), (uint64_t)pkt->payloadDelay)); 1154 |
1152 // A writeback searches for the block, then writes the data 1153 lat = calculateAccessLatency(blk, pkt->headerDelay, tag_latency); 1154 | |
1155 // if this a write-through packet it will be sent to cache 1156 // below 1157 return !pkt->writeThrough(); 1158 } else if (blk && (pkt->needsWritable() ? blk->isWritable() : 1159 blk->isReadable())) { 1160 // OK to satisfy access 1161 incHitCount(pkt); | 1155 // if this a write-through packet it will be sent to cache 1156 // below 1157 return !pkt->writeThrough(); 1158 } else if (blk && (pkt->needsWritable() ? blk->isWritable() : 1159 blk->isReadable())) { 1160 // OK to satisfy access 1161 incHitCount(pkt); |
1162 satisfyRequest(pkt, blk); 1163 maintainClusivity(pkt->fromCache(), blk); | |
1164 1165 // Calculate access latency based on the need to access the data array 1166 if (pkt->isRead() || pkt->isWrite()) { 1167 lat = calculateAccessLatency(blk, pkt->headerDelay, tag_latency); 1168 } else { 1169 lat = calculateTagOnlyLatency(pkt->headerDelay, tag_latency); 1170 } 1171 | 1162 1163 // Calculate access latency based on the need to access the data array 1164 if (pkt->isRead() || pkt->isWrite()) { 1165 lat = calculateAccessLatency(blk, pkt->headerDelay, tag_latency); 1166 } else { 1167 lat = calculateTagOnlyLatency(pkt->headerDelay, tag_latency); 1168 } 1169 |
1170 satisfyRequest(pkt, blk); 1171 maintainClusivity(pkt->fromCache(), blk); 1172 |
|
1172 return true; 1173 } 1174 1175 // Can't satisfy access normally... either no block (blk == nullptr) 1176 // or have block but need writable 1177 1178 incMissCount(pkt); 1179 --- 1344 unchanged lines hidden --- | 1173 return true; 1174 } 1175 1176 // Can't satisfy access normally... either no block (blk == nullptr) 1177 // or have block but need writable 1178 1179 incMissCount(pkt); 1180 --- 1344 unchanged lines hidden --- |