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