From e7c8154479b3d0dbdc26cbb91fbccc2b9870e394 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Thu, 10 Jan 2019 11:17:09 +0000 Subject: [PATCH] cpu: Add VecElem entries in MinorCPU Scoreboard 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 Reviewed-on: https://gem5-review.googlesource.com/c/15597 Maintainer: Andreas Sandberg Reviewed-by: Andreas Sandberg --- src/cpu/minor/scoreboard.cc | 2 +- src/cpu/minor/scoreboard.hh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cpu/minor/scoreboard.cc b/src/cpu/minor/scoreboard.cc index c56d3b303..196d035eb 100644 --- a/src/cpu/minor/scoreboard.cc +++ b/src/cpu/minor/scoreboard.cc @@ -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: diff --git a/src/cpu/minor/scoreboard.hh b/src/cpu/minor/scoreboard.hh index 9e42c2a6b..37ae8da0a 100644 --- a/src/cpu/minor/scoreboard.hh +++ b/src/cpu/minor/scoreboard.hh @@ -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), -- 2.30.2