Daecheol You has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/50287 )
Change subject: cpu-minor: Fix for minor CPU scoreboard
......................................................................
cpu-minor: Fix for minor CPU scoreboard
When the scoreboard checks RAW dependency, it determines whether
the source registers can be forwarded or not to evaluate
relative latency. To do that, fuIndices[index] should be used
as an index for accessing cant_forward_from_fu_indices, not register
index itself. Moreover, since fuIndices[index] is cleared as -1
by clearInstDests(), the first compare should be fuIndices[index] != -1
instead of 1.
Change-Id: Ic62546855a8ad5365064d2ea2e2a0fbc1ccc6f41
---
M src/cpu/minor/scoreboard.cc
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/cpu/minor/scoreboard.cc b/src/cpu/minor/scoreboard.cc
index b957c3d..373c43e 100644
--- a/src/cpu/minor/scoreboard.cc
+++ b/src/cpu/minor/scoreboard.cc
@@ -245,10 +245,11 @@
unsigned short int index;
if (findIndex(reg, index)) {
- bool cant_forward = fuIndices[index] != 1 &&
+ int src_reg_fu = fuIndices[index];
+ bool cant_forward = src_reg_fu != -1 &&
cant_forward_from_fu_indices &&
- index < cant_forward_from_fu_indices->size() &&
- (*cant_forward_from_fu_indices)[index];
+ src_reg_fu < cant_forward_from_fu_indices->size() &&
+ (*cant_forward_from_fu_indices)[src_reg_fu];
Cycles relative_latency = (cant_forward ? Cycles(0) :
(src_index >= num_relative_latencies ?
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50287
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: Ic62546855a8ad5365064d2ea2e2a0fbc1ccc6f41
Gerrit-Change-Number: 50287
Gerrit-PatchSet: 1
Gerrit-Owner: Daecheol You <[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