Tom Rollet has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/50732 )
Change subject: cpu-o3: remove false dummy entry in LSQ
......................................................................
cpu-o3: remove false dummy entry in LSQ
The constructor of the LoadQueue and StoreQueue were adding
an additional entry compared to the giben 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
---
M src/cpu/o3/lsq_unit.cc
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/cpu/o3/lsq_unit.cc b/src/cpu/o3/lsq_unit.cc
index 675f12f..d324b7a 100644
--- a/src/cpu/o3/lsq_unit.cc
+++ b/src/cpu/o3/lsq_unit.cc
@@ -201,7 +201,7 @@
}
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),
@@ -418,20 +418,16 @@
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();
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50732
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I41507d003e4d55e91215e21f57119af7b3e4d465
Gerrit-Change-Number: 50732
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Rollet <tom.rol...@huawei.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s