Merge branch 'bug/lp5_r2r' into 'develop'
Add fix for LP5 rank2rank timings. See merge request ems/astdm/modeling.dram/dram.sys.5!8
This commit is contained in:
@@ -62,14 +62,16 @@ public:
|
||||
const sc_core::sc_time tRRD;
|
||||
//const sc_core::sc_time tCCD;
|
||||
const sc_core::sc_time tRL;
|
||||
//const sc_core::sc_time tRPST;
|
||||
const sc_core::sc_time tRPRE;
|
||||
const sc_core::sc_time tRPST;
|
||||
//const sc_core::sc_time tDQSCK;
|
||||
const sc_core::sc_time tRBTP;
|
||||
const sc_core::sc_time tWL;
|
||||
//const sc_core::sc_time tDQSS;
|
||||
//const sc_core::sc_time tDQS2DQ;
|
||||
const sc_core::sc_time tWR;
|
||||
//const sc_core::sc_time tWPRE;
|
||||
const sc_core::sc_time tWPRE;
|
||||
const sc_core::sc_time tWPST;
|
||||
//const sc_core::sc_time tWTR;
|
||||
//const sc_core::sc_time tXP;
|
||||
//const sc_core::sc_time tSR;
|
||||
|
||||
@@ -122,9 +122,11 @@ sc_time CheckerLPDDR5::timeToSatisfyConstraints(Command command, const tlm_gener
|
||||
if (lastCommandStart != sc_max_time())
|
||||
{
|
||||
if (lastBurstLengthByCommand[Command::RD] == 32)
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + tBURST32 + memSpec->tRTRS);
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->BL_n_min_32
|
||||
+ memSpec->tCK + memSpec->tRPST + memSpec->tRPRE);
|
||||
else
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + tBURST16 + memSpec->tRTRS);
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->BL_n_min_16
|
||||
+ memSpec->tCK + memSpec->tRPST + memSpec->tRPRE);
|
||||
}
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndBankGroup[Command::RDA][bankGroup.ID()];
|
||||
@@ -157,9 +159,11 @@ sc_time CheckerLPDDR5::timeToSatisfyConstraints(Command command, const tlm_gener
|
||||
{
|
||||
// TODO: BG mode with BL32
|
||||
if (lastBurstLengthByCommand[Command::RDA] == 32)
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + tBURST32 + memSpec->tRTRS);
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->BL_n_min_32
|
||||
+ memSpec->tCK + memSpec->tRPST + memSpec->tRPRE);
|
||||
else
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + tBURST16 + memSpec->tRTRS);
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->BL_n_min_16
|
||||
+ memSpec->tCK + memSpec->tRPST + memSpec->tRPRE);
|
||||
}
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndBankGroup[Command::WR][bankGroup.ID()];
|
||||
@@ -184,6 +188,19 @@ sc_time CheckerLPDDR5::timeToSatisfyConstraints(Command command, const tlm_gener
|
||||
+ memSpec->BL_n_min_16 + memSpec->tWTR_S);
|
||||
}
|
||||
|
||||
lastCommandStart = lastScheduledByCommand[Command::WR] != lastScheduledByCommandAndRank[Command::WR][rank.ID()] ?
|
||||
lastScheduledByCommand[Command::WR] : sc_max_time();
|
||||
if (lastCommandStart != sc_max_time())
|
||||
{
|
||||
// TODO: BG mode with BL32
|
||||
if (lastBurstLengthByCommand[Command::WR] == 32)
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart
|
||||
+ memSpec->tWL + memSpec->BL_n_min_32 + memSpec->tCK - memSpec->tRL);
|
||||
else
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart
|
||||
+ memSpec->tWL + memSpec->BL_n_min_16 + memSpec->tCK - memSpec->tRL);
|
||||
}
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndBankGroup[Command::WRA][bankGroup.ID()];
|
||||
if (lastCommandStart != sc_max_time())
|
||||
{
|
||||
@@ -205,6 +222,19 @@ sc_time CheckerLPDDR5::timeToSatisfyConstraints(Command command, const tlm_gener
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tWL
|
||||
+ memSpec->BL_n_min_16 + memSpec->tWTR_S);
|
||||
}
|
||||
|
||||
lastCommandStart = lastScheduledByCommand[Command::WRA] != lastScheduledByCommandAndRank[Command::WRA][rank.ID()] ?
|
||||
lastScheduledByCommand[Command::WRA] : sc_max_time();
|
||||
if (lastCommandStart != sc_max_time())
|
||||
{
|
||||
// TODO: BG mode with BL32
|
||||
if (lastBurstLengthByCommand[Command::WRA] == 32)
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart
|
||||
+ memSpec->tWL + memSpec->BL_n_min_32 + memSpec->tCK - memSpec->tRL);
|
||||
else
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart
|
||||
+ memSpec->tWL + memSpec->BL_n_min_16 + memSpec->tCK - memSpec->tRL);
|
||||
}
|
||||
}
|
||||
else if (command == Command::WR || command == Command::WRA)
|
||||
{
|
||||
@@ -239,6 +269,19 @@ sc_time CheckerLPDDR5::timeToSatisfyConstraints(Command command, const tlm_gener
|
||||
+ memSpec->BL_n_min_16 + memSpec->tWCK2DQO - memSpec->tWL);
|
||||
}
|
||||
|
||||
lastCommandStart = lastScheduledByCommand[Command::RD] != lastScheduledByCommandAndRank[Command::RD][rank.ID()] ?
|
||||
lastScheduledByCommand[Command::RD] : sc_max_time();
|
||||
if (lastCommandStart != sc_max_time())
|
||||
{
|
||||
// TODO: BG mode with BL32
|
||||
if (lastBurstLengthByCommand[Command::RD] == 32)
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart
|
||||
+ memSpec->tRL + memSpec->BL_n_min_32 + memSpec->tWCK2DQO + memSpec->tRPST - memSpec->tWL);
|
||||
else
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart
|
||||
+ memSpec->tRL + memSpec->BL_n_min_16 + memSpec->tWCK2DQO + memSpec->tRPST - memSpec->tWL);
|
||||
}
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndBankGroup[Command::RDA][bankGroup.ID()];
|
||||
if (lastCommandStart != sc_max_time())
|
||||
{
|
||||
@@ -261,6 +304,19 @@ sc_time CheckerLPDDR5::timeToSatisfyConstraints(Command command, const tlm_gener
|
||||
+ memSpec->BL_n_min_16 + memSpec->tWCK2DQO - memSpec->tWL);
|
||||
}
|
||||
|
||||
lastCommandStart = lastScheduledByCommand[Command::RDA] != lastScheduledByCommandAndRank[Command::RDA][rank.ID()] ?
|
||||
lastScheduledByCommand[Command::RDA] : sc_max_time();
|
||||
if (lastCommandStart != sc_max_time())
|
||||
{
|
||||
// TODO: BG mode with BL32
|
||||
if (lastBurstLengthByCommand[Command::RDA] == 32)
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart
|
||||
+ memSpec->tRL + memSpec->BL_n_min_32 + memSpec->tWCK2DQO + memSpec->tRPST - memSpec->tWL);
|
||||
else
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart
|
||||
+ memSpec->tRL + memSpec->BL_n_min_16 + memSpec->tWCK2DQO + memSpec->tRPST - memSpec->tWL);
|
||||
}
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndBankGroup[Command::WR][bankGroup.ID()];
|
||||
if (lastCommandStart != sc_max_time())
|
||||
{
|
||||
@@ -291,9 +347,9 @@ sc_time CheckerLPDDR5::timeToSatisfyConstraints(Command command, const tlm_gener
|
||||
{
|
||||
// TODO: BG mode with BL32
|
||||
if (lastBurstLengthByCommand[Command::WR] == 32)
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + tBURST32 + memSpec->tRTRS);
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->BL_n_min_32 + memSpec->tCK);
|
||||
else
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + tBURST16 + memSpec->tRTRS);
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->BL_n_min_16 + memSpec->tCK);
|
||||
}
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndBankGroup[Command::WRA][bankGroup.ID()];
|
||||
@@ -325,9 +381,9 @@ sc_time CheckerLPDDR5::timeToSatisfyConstraints(Command command, const tlm_gener
|
||||
if (lastCommandStart != sc_max_time())
|
||||
{
|
||||
if (lastBurstLengthByCommand[Command::WRA] == 32)
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + tBURST32 + memSpec->tRTRS);
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->BL_n_min_32 + memSpec->tCK);
|
||||
else
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + tBURST16 + memSpec->tRTRS);
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->BL_n_min_16 + memSpec->tCK);
|
||||
}
|
||||
}
|
||||
else if (command == Command::ACT)
|
||||
|
||||
Reference in New Issue
Block a user