Tom Rollet has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/46600 )
Change subject: cpu-o3: fix dispatch assert triggering on debug mode
......................................................................
cpu-o3: fix dispatch assert triggering on debug mode
On configs with renameWidth > dispatchWidth, on receiving
renameWidth number of only squashed instructions:
the dispatch stage will not be able to treat all instructions.
Some squashed instructions will then remain in the 'inst' buffer
after the dispatch stage.
'validInstsFromRename' function don't take into account squashed
instructions, thus the remaining squashed instructions are
not moved to the skid buffer.
The cycle after, the assert in sortInsts will trigger(on debug mode)
because the 'inst' buffer is not empty.
Change-Id: I1a1ed5a7f040041363bd1b2c7bf10c85eb7febaf
---
M src/cpu/o3/iew.cc
M src/cpu/o3/iew.hh
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/src/cpu/o3/iew.cc b/src/cpu/o3/iew.cc
index b53e389..4c97e2d 100644
--- a/src/cpu/o3/iew.cc
+++ b/src/cpu/o3/iew.cc
@@ -591,14 +591,12 @@
}
unsigned
-IEW::validInstsFromRename()
+IEW::instsFromRename()
{
unsigned inst_count = 0;
- for (int i=0; i<fromRename->size; i++) {
- if (!fromRename->insts[i]->isSquashed())
- inst_count++;
- }
+ for (int i = 0; i < fromRename->size; i++)
+ inst_count++;
return inst_count;
}
@@ -875,7 +873,7 @@
++iewStats.unblockCycles;
- if (validInstsFromRename()) {
+ if (instsFromRename()) {
// Add the current inputs to the skid buffer so they can be
// reprocessed when this stage unblocks.
skidInsert(tid);
diff --git a/src/cpu/o3/iew.hh b/src/cpu/o3/iew.hh
index 5049eb4..d4e50e4 100644
--- a/src/cpu/o3/iew.hh
+++ b/src/cpu/o3/iew.hh
@@ -271,10 +271,8 @@
*/
void writebackInsts();
- /** Returns the number of valid, non-squashed instructions coming from
- * rename to dispatch.
- */
- unsigned validInstsFromRename();
+ /** Returns the number of instructions coming from rename to dispatch.
*/
+ unsigned instsFromRename();
/** Checks if any of the stall conditions are currently true. */
bool checkStall(ThreadID tid);
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/46600
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: I1a1ed5a7f040041363bd1b2c7bf10c85eb7febaf
Gerrit-Change-Number: 46600
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Rollet <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s