cpu-o3: remove false dummy entry in LSQ
The constructor of the LoadQueue and StoreQueue were adding an additional entry compared to the given configuration. The removed comment was saying that this additional entry was used as a dummy entry. This is not necessary anymore with the current structure. It was even leading to incorrect behavior as a loadQueue could have one more outstanding load than specified by the configuration. Valgrind does not spot any illegal access. Change-Id: I41507d003e4d55e91215e21f57119af7b3e4d465 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50732 Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -200,7 +200,7 @@ LSQUnit::completeDataAccess(PacketPtr pkt)
|
||||
}
|
||||
|
||||
LSQUnit::LSQUnit(uint32_t lqEntries, uint32_t sqEntries)
|
||||
: lsqID(-1), storeQueue(sqEntries+1), loadQueue(lqEntries+1),
|
||||
: lsqID(-1), storeQueue(sqEntries), loadQueue(lqEntries),
|
||||
storesToWB(0),
|
||||
htmStarts(0), htmStops(0),
|
||||
lastRetiredHtmUid(0),
|
||||
@@ -417,20 +417,16 @@ LSQUnit::getMemDepViolator()
|
||||
unsigned
|
||||
LSQUnit::numFreeLoadEntries()
|
||||
{
|
||||
//LQ has an extra dummy entry to differentiate
|
||||
//empty/full conditions. Subtract 1 from the free entries.
|
||||
DPRINTF(LSQUnit, "LQ size: %d, #loads occupied: %d\n",
|
||||
1 + loadQueue.capacity(), loadQueue.size());
|
||||
loadQueue.capacity(), loadQueue.size());
|
||||
return loadQueue.capacity() - loadQueue.size();
|
||||
}
|
||||
|
||||
unsigned
|
||||
LSQUnit::numFreeStoreEntries()
|
||||
{
|
||||
//SQ has an extra dummy entry to differentiate
|
||||
//empty/full conditions. Subtract 1 from the free entries.
|
||||
DPRINTF(LSQUnit, "SQ size: %d, #stores occupied: %d\n",
|
||||
1 + storeQueue.capacity(), storeQueue.size());
|
||||
storeQueue.capacity(), storeQueue.size());
|
||||
return storeQueue.capacity() - storeQueue.size();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user