Tom Rollet has submitted this change. ( 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
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46600
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/cpu/o3/iew.cc
M src/cpu/o3/iew.hh
2 files changed, 1 insertion(+), 19 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/cpu/o3/iew.cc b/src/cpu/o3/iew.cc
index b53e389..a3985ab 100644
--- a/src/cpu/o3/iew.cc
+++ b/src/cpu/o3/iew.cc
@@ -590,19 +590,6 @@
     (*iewQueue)[wbCycle].size++;
 }

-unsigned
-IEW::validInstsFromRename()
-{
-    unsigned inst_count = 0;
-
-    for (int i=0; i<fromRename->size; i++) {
-        if (!fromRename->insts[i]->isSquashed())
-            inst_count++;
-    }
-
-    return inst_count;
-}
-
 void
 IEW::skidInsert(ThreadID tid)
 {
@@ -875,7 +862,7 @@

         ++iewStats.unblockCycles;

-        if (validInstsFromRename()) {
+        if (fromRename->size != 0) {
             // 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..b1667df 100644
--- a/src/cpu/o3/iew.hh
+++ b/src/cpu/o3/iew.hh
@@ -271,11 +271,6 @@
      */
     void writebackInsts();

-    /** Returns the number of valid, non-squashed instructions coming from
-     * rename to dispatch.
-     */
-    unsigned validInstsFromRename();
-
     /** 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: 3
Gerrit-Owner: Tom Rollet <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Tom Rollet <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to