std::memcpy(load_packet_data, store_packet_data, load_size);
}
+void
+LSQ::StoreBuffer::countIssuedStore(LSQRequestPtr request)
+{
+ /* Barriers are accounted for as they are cleared from
+ * the queue, not after their transfers are complete */
+ if (!request->isBarrier())
+ numUnissuedAccesses--;
+}
+
void
LSQ::StoreBuffer::step()
{
" system\n", *(request->inst));
if (lsq.tryToSend(request)) {
- /* Barrier are accounted for as they are cleared from
- * the queue, not after their transfers are complete */
- if (!request->isBarrier())
- numUnissuedAccesses--;
+ countIssuedStore(request);
issue_count++;
} else {
/* Don't step on to the next store buffer entry if this
/* Response to a request from the store buffer */
request->retireResponse(response);
- /* Remove completed requests unless they are barrier (which will
+ /* Remove completed requests unless they are barriers (which will
* need to be removed in order */
if (request->isComplete()) {
if (!request->isBarrier()) {
break;
case LSQRequest::StoreBufferIssuing:
/* In the store buffer */
- storeBuffer.numUnissuedAccesses--;
+ storeBuffer.countIssuedStore(retryRequest);
break;
default:
assert(false);
* completely issued to the memory system */
unsigned int numUnissuedStores() { return numUnissuedAccesses; }
+ /** Count a store being issued to memory by decrementing
+ * numUnissuedAccesses. Does not count barrier requests as they
+ * will be handles as barriers are cleared from the buffer */
+ void countIssuedStore(LSQRequestPtr request);
+
/** Drained if there is absolutely nothing left in the buffer */
bool isDrained() const { return slots.empty(); }