lsq.cc (10566:c99c8d2a7c31) | lsq.cc (10581:7c4f1d0a8cff) |
---|---|
1/* 2 * Copyright (c) 2013-2014 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 --- 716 unchanged lines hidden (view full) --- 725 726 void *load_packet_data = load->packet->getPtr<void>(); 727 void *store_packet_data = store->packet->getPtr<uint8_t>() + addr_offset; 728 729 std::memcpy(load_packet_data, store_packet_data, load_size); 730} 731 732void | 1/* 2 * Copyright (c) 2013-2014 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 --- 716 unchanged lines hidden (view full) --- 725 726 void *load_packet_data = load->packet->getPtr<void>(); 727 void *store_packet_data = store->packet->getPtr<uint8_t>() + addr_offset; 728 729 std::memcpy(load_packet_data, store_packet_data, load_size); 730} 731 732void |
733LSQ::StoreBuffer::countIssuedStore(LSQRequestPtr request) 734{ 735 /* Barriers are accounted for as they are cleared from 736 * the queue, not after their transfers are complete */ 737 if (!request->isBarrier()) 738 numUnissuedAccesses--; 739} 740 741void |
|
733LSQ::StoreBuffer::step() 734{ 735 DPRINTF(MinorMem, "StoreBuffer step numUnissuedAccesses: %d\n", 736 numUnissuedAccesses); 737 738 if (numUnissuedAccesses != 0 && lsq.state == LSQ::MemoryRunning) { 739 /* Clear all the leading barriers */ 740 while (!slots.empty() && --- 39 unchanged lines hidden (view full) --- 780 issued = false; 781 } else if (!(request->state == LSQRequest::StoreBufferIssuing && 782 request->sentAllPackets())) 783 { 784 DPRINTF(MinorMem, "Trying to send request: %s to memory" 785 " system\n", *(request->inst)); 786 787 if (lsq.tryToSend(request)) { | 742LSQ::StoreBuffer::step() 743{ 744 DPRINTF(MinorMem, "StoreBuffer step numUnissuedAccesses: %d\n", 745 numUnissuedAccesses); 746 747 if (numUnissuedAccesses != 0 && lsq.state == LSQ::MemoryRunning) { 748 /* Clear all the leading barriers */ 749 while (!slots.empty() && --- 39 unchanged lines hidden (view full) --- 789 issued = false; 790 } else if (!(request->state == LSQRequest::StoreBufferIssuing && 791 request->sentAllPackets())) 792 { 793 DPRINTF(MinorMem, "Trying to send request: %s to memory" 794 " system\n", *(request->inst)); 795 796 if (lsq.tryToSend(request)) { |
788 /* Barrier are accounted for as they are cleared from 789 * the queue, not after their transfers are complete */ 790 if (!request->isBarrier()) 791 numUnissuedAccesses--; | 797 countIssuedStore(request); |
792 issue_count++; 793 } else { 794 /* Don't step on to the next store buffer entry if this 795 * one hasn't issued all its packets as the store 796 * buffer must still enforce ordering */ 797 issued = false; 798 } 799 } --- 393 unchanged lines hidden (view full) --- 1193 request->hasPacketsInMemSystem(), request->isComplete()); 1194 1195 break; 1196 case LSQRequest::StoreBufferIssuing: 1197 case LSQRequest::StoreBufferNeedsRetry: 1198 /* Response to a request from the store buffer */ 1199 request->retireResponse(response); 1200 | 798 issue_count++; 799 } else { 800 /* Don't step on to the next store buffer entry if this 801 * one hasn't issued all its packets as the store 802 * buffer must still enforce ordering */ 803 issued = false; 804 } 805 } --- 393 unchanged lines hidden (view full) --- 1199 request->hasPacketsInMemSystem(), request->isComplete()); 1200 1201 break; 1202 case LSQRequest::StoreBufferIssuing: 1203 case LSQRequest::StoreBufferNeedsRetry: 1204 /* Response to a request from the store buffer */ 1205 request->retireResponse(response); 1206 |
1201 /* Remove completed requests unless they are barrier (which will | 1207 /* Remove completed requests unless they are barriers (which will |
1202 * need to be removed in order */ 1203 if (request->isComplete()) { 1204 if (!request->isBarrier()) { 1205 storeBuffer.deleteRequest(request); 1206 } else { 1207 DPRINTF(MinorMem, "Completed transfer for barrier: %s" 1208 " leaving the request as it is also a barrier\n", 1209 *(request->inst)); --- 50 unchanged lines hidden (view full) --- 1260 /* Successfully sent, need to move the request */ 1261 switch (retryRequest->state) { 1262 case LSQRequest::RequestIssuing: 1263 /* In the requests queue */ 1264 moveFromRequestsToTransfers(retryRequest); 1265 break; 1266 case LSQRequest::StoreBufferIssuing: 1267 /* In the store buffer */ | 1208 * need to be removed in order */ 1209 if (request->isComplete()) { 1210 if (!request->isBarrier()) { 1211 storeBuffer.deleteRequest(request); 1212 } else { 1213 DPRINTF(MinorMem, "Completed transfer for barrier: %s" 1214 " leaving the request as it is also a barrier\n", 1215 *(request->inst)); --- 50 unchanged lines hidden (view full) --- 1266 /* Successfully sent, need to move the request */ 1267 switch (retryRequest->state) { 1268 case LSQRequest::RequestIssuing: 1269 /* In the requests queue */ 1270 moveFromRequestsToTransfers(retryRequest); 1271 break; 1272 case LSQRequest::StoreBufferIssuing: 1273 /* In the store buffer */ |
1268 storeBuffer.numUnissuedAccesses--; | 1274 storeBuffer.countIssuedStore(retryRequest); |
1269 break; 1270 default: 1271 assert(false); 1272 break; 1273 } 1274 } 1275 1276 retryRequest = NULL; --- 344 unchanged lines hidden --- | 1275 break; 1276 default: 1277 assert(false); 1278 break; 1279 } 1280 } 1281 1282 retryRequest = NULL; --- 344 unchanged lines hidden --- |