cpu: Add VecElem entries in MinorCPU Scoreboard
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 10 Jan 2019 11:17:09 +0000 (11:17 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 25 Jan 2019 12:47:58 +0000 (12:47 +0000)
This patch is:
* Increasing the number of bits in the Scoreboard so that
  it is keeping track of VecElemClass dependencies.
* Fixing VecElemClass entry in the scoreboard table so that it
  correctly uses flatIndex rather than index.

Change-Id: Ie4877e5fe410b1437447adebbe289602a443f7c0
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15597
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
src/cpu/minor/scoreboard.cc
src/cpu/minor/scoreboard.hh

index c56d3b30302da887ebd0bc3fcfc6f9396c29934d..196d035ebcf97cc87da648fcf0cf94bf93471afb 100644 (file)
@@ -74,7 +74,7 @@ Scoreboard::findIndex(const RegId& reg, Index &scoreboard_index)
             break;
           case VecElemClass:
             scoreboard_index = TheISA::NumIntRegs + TheISA::NumCCRegs +
-                TheISA::NumFloatRegs + TheISA::NumVecRegs + reg.index();
+                TheISA::NumFloatRegs + reg.flatIndex();
             ret = true;
             break;
           case CCRegClass:
index 9e42c2a6b184bcdc1f3493df70d495f89b02807c..37ae8da0a6764a78b585dbaafd36f468b7cc8eef 100644 (file)
@@ -94,7 +94,8 @@ class Scoreboard : public Named
     Scoreboard(const std::string &name) :
         Named(name),
         numRegs(TheISA::NumIntRegs + TheISA::NumCCRegs +
-            TheISA::NumFloatRegs + TheISA::NumVecRegs),
+            TheISA::NumFloatRegs +
+            (TheISA::NumVecRegs * TheISA::NumVecElemPerVecReg)),
         numResults(numRegs, 0),
         numUnpredictableResults(numRegs, 0),
         fuIndices(numRegs, 0),