From 2836d9379b733a4567a2c379bf1ce42054094097 Mon Sep 17 00:00:00 2001 From: Iron Prando da Silva Date: Thu, 7 Apr 2022 10:13:35 +0200 Subject: [PATCH] Correcting dependency capture from REFP2B phases. --- .../specialized/LPDDR5dbphaseentry.cpp | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/DRAMSys/traceAnalyzer/businessObjects/dramTimeDependencies/dbEntries/specialized/LPDDR5dbphaseentry.cpp b/DRAMSys/traceAnalyzer/businessObjects/dramTimeDependencies/dbEntries/specialized/LPDDR5dbphaseentry.cpp index 58ab7983..25986237 100644 --- a/DRAMSys/traceAnalyzer/businessObjects/dramTimeDependencies/dbEntries/specialized/LPDDR5dbphaseentry.cpp +++ b/DRAMSys/traceAnalyzer/businessObjects/dramTimeDependencies/dbEntries/specialized/LPDDR5dbphaseentry.cpp @@ -51,13 +51,26 @@ bool LPDDR5DBPhaseEntry::potentialDependency(const TimeDependency& dep, const st if (!other) return false; bool isCmdPool = dep.phaseDep == StringMapper::Identifier::CMD_BUS; - bool isREFP2B = dep.phaseDep == StringMapper::Identifier::REFP2B; + bool thisIsREFP2B = phaseName == StringMapper::Identifier::REFP2B; + bool otherIsREFP2B = dep.phaseDep == StringMapper::Identifier::REFP2B; - bool const skipOnIntraBankAndDifferentBanks = { + bool const skipOnIntraBankAndNoBankDep = { dep.depType == DependencyType::IntraBank - && ( - (tBank != other->tBank) - || (isREFP2B && tBank != (other->tBank - bankOffsetREFP2B)) + && + ( + ( // If phase is not REFP2B or both are REFP2B, intra bank dependency must occur in the same bank + (!thisIsREFP2B || (thisIsREFP2B && otherIsREFP2B)) + && tBank != other->tBank + ) + || + ( // If phase is REFP2B, "intra bank" dependency must occur in the same bank or in the offset bank + (thisIsREFP2B && !otherIsREFP2B) + && + ( + tBank != other->tBank + && tBank != (other->tBank - bankOffsetREFP2B) + ) + ) ) }; bool const skipOnIntraBankgroupAndDifferentBankgroup = { @@ -75,7 +88,7 @@ bool LPDDR5DBPhaseEntry::potentialDependency(const TimeDependency& dep, const st }; return !( - skipOnIntraBankAndDifferentBanks + skipOnIntraBankAndNoBankDep || skipOnIntraBankgroupAndDifferentBankgroup || skipOnIntraRankAndDifferentRanks || skipOnInterRankAndSameRank