Introduce new phases on simulator side.
This commit is contained in:
@@ -131,9 +131,12 @@ void TlmRecorder::recordPhase(tlm_generic_payload &trans,
|
||||
|
||||
if (currentTransactionsInSystem[&trans].cmd == 'X')
|
||||
{
|
||||
if (phase == END_REFA
|
||||
if (phase == END_REFAB
|
||||
|| phase == END_RFMAB
|
||||
|| phase == END_REFB
|
||||
|| phase == END_REFPB
|
||||
|| phase == END_RFMPB
|
||||
|| phase == END_REFP2B
|
||||
|| phase == END_RFMP2B
|
||||
|| phase == END_REFSB
|
||||
|| phase == END_RFMSB
|
||||
|| phase == END_PDNA
|
||||
@@ -298,12 +301,14 @@ void TlmRecorder::prepareSqlStatements()
|
||||
|
||||
insertGeneralInfoString =
|
||||
"INSERT INTO GeneralInfo VALUES"
|
||||
"(:numberOfTransactions,:end,:numberOfRanks,:numberOfBankgroups,:numberOfBanks,:clk,:unitOfTime,:mcconfig,:memspec,"
|
||||
":traces,:windowSize, :flexibleRefresh, :maxRefBurst, :controllerThread, :maxBufferDepth)";
|
||||
"(:numberOfTransactions, :end, :numberOfRanks, :numberOfBankGroups, :numberOfBanks, :clk, :unitOfTime, "
|
||||
":mcconfig, :memspec, :traces, :windowSize, :refreshMaxPostponed, :refreshMaxPulledin, :controllerThread, "
|
||||
":maxBufferDepth, :per2BankOffset)";
|
||||
|
||||
insertCommandLengthsString =
|
||||
"INSERT INTO CommandLengths VALUES"
|
||||
"(:NOP, :RD, :WR, :RDA, :WRA, :ACT, :PRE, :REFB, :PRESB, :REFSB, :RFMSB, :PREA, :REFA, :RFMAB, :PDEA, :PDXA, :PDEP, :PDXP, :SREFEN, :SREFEX)";
|
||||
"(:NOP, :RD, :WR, :RDA, :WRA, :ACT, :PREPB, :REFPB, :RFMPB, :REFP2B, :RFMP2B, :PRESB, :REFSB, :RFMSB, "
|
||||
":PREAB, :REFAB, :RFMAB, :PDEA, :PDXA, :PDEP, :PDXP, :SREFEN, :SREFEX)";
|
||||
|
||||
insertDebugMessageString =
|
||||
"INSERT INTO DebugMessages (Time,Message) Values (:time,:message)";
|
||||
@@ -340,7 +345,7 @@ void TlmRecorder::insertGeneralInfo()
|
||||
sqlite3_bind_int(insertGeneralInfoStatement, 3, static_cast<int>(Configuration::getInstance().memSpec->numberOfRanks));
|
||||
sqlite3_bind_int(insertGeneralInfoStatement, 4, static_cast<int>(Configuration::getInstance().memSpec->numberOfBankGroups));
|
||||
sqlite3_bind_int(insertGeneralInfoStatement, 5, static_cast<int>(Configuration::getInstance().memSpec->numberOfBanks));
|
||||
sqlite3_bind_int(insertGeneralInfoStatement, 6, static_cast<int>(Configuration::getInstance().memSpec->tCK.value()));
|
||||
sqlite3_bind_int64(insertGeneralInfoStatement, 6, static_cast<int64_t>(Configuration::getInstance().memSpec->tCK.value()));
|
||||
sqlite3_bind_text(insertGeneralInfoStatement, 7, "PS", 2, nullptr);
|
||||
|
||||
std::fstream mcconfig_stream, memspec_stream;
|
||||
@@ -352,28 +357,17 @@ void TlmRecorder::insertGeneralInfo()
|
||||
sqlite3_bind_text(insertGeneralInfoStatement, 8, mcconfig_dump.c_str(), static_cast<int>(mcconfig_dump.length()), nullptr);
|
||||
sqlite3_bind_text(insertGeneralInfoStatement, 9, memspec_dump.c_str(), static_cast<int>(memspec_dump.length()), nullptr);
|
||||
sqlite3_bind_text(insertGeneralInfoStatement, 10, traces.c_str(), static_cast<int>(traces.length()), nullptr);
|
||||
if (!Configuration::getInstance().enableWindowing)
|
||||
if (Configuration::getInstance().enableWindowing)
|
||||
sqlite3_bind_int64(insertGeneralInfoStatement, 11, static_cast<int64_t>((Configuration::getInstance().memSpec->tCK
|
||||
* Configuration::getInstance().windowSize).value()));
|
||||
else
|
||||
sqlite3_bind_int64(insertGeneralInfoStatement, 11, 0);
|
||||
else
|
||||
sqlite3_bind_int64(insertGeneralInfoStatement, 11,
|
||||
static_cast<int64_t>((Configuration::getInstance().memSpec->tCK *
|
||||
Configuration::getInstance().windowSize).value()));
|
||||
|
||||
if ((Configuration::getInstance().refreshMaxPostponed > 0)
|
||||
|| (Configuration::getInstance().refreshMaxPulledin > 0))
|
||||
{
|
||||
sqlite3_bind_int(insertGeneralInfoStatement, 12, 1);
|
||||
sqlite3_bind_int(insertGeneralInfoStatement, 13,
|
||||
static_cast<int>(std::max(Configuration::getInstance().refreshMaxPostponed,
|
||||
Configuration::getInstance().refreshMaxPulledin)));
|
||||
}
|
||||
else
|
||||
{
|
||||
sqlite3_bind_int(insertGeneralInfoStatement, 12, 0);
|
||||
sqlite3_bind_int(insertGeneralInfoStatement, 13, 0);
|
||||
}
|
||||
sqlite3_bind_int(insertGeneralInfoStatement, 14, static_cast<int>(UINT_MAX));
|
||||
sqlite3_bind_int(insertGeneralInfoStatement, 12, static_cast<int>(Configuration::getInstance().refreshMaxPostponed));
|
||||
sqlite3_bind_int(insertGeneralInfoStatement, 13, static_cast<int>(Configuration::getInstance().refreshMaxPulledin));
|
||||
sqlite3_bind_int64(insertGeneralInfoStatement, 14, static_cast<int64_t>(UINT64_MAX));
|
||||
sqlite3_bind_int(insertGeneralInfoStatement, 15, static_cast<int>(Configuration::getInstance().requestBufferSize));
|
||||
sqlite3_bind_int(insertGeneralInfoStatement, 16,
|
||||
static_cast<int>(Configuration::getInstance().memSpec->getPer2BankOffset()));
|
||||
executeSqlStatement(insertGeneralInfoStatement);
|
||||
}
|
||||
|
||||
@@ -389,18 +383,21 @@ void TlmRecorder::insertCommandLengths()
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 6, static_cast<int>(lround(memSpec->getCommandLength(Command::ACT) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 7, static_cast<int>(lround(memSpec->getCommandLength(Command::PREPB) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 8, static_cast<int>(lround(memSpec->getCommandLength(Command::REFPB) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 9, static_cast<int>(lround(memSpec->getCommandLength(Command::PRESB) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 10, static_cast<int>(lround(memSpec->getCommandLength(Command::REFSB) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 11, static_cast<int>(lround(memSpec->getCommandLength(Command::RFMSB) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 12, static_cast<int>(lround(memSpec->getCommandLength(Command::PREAB) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 13, static_cast<int>(lround(memSpec->getCommandLength(Command::REFAB) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 14, static_cast<int>(lround(memSpec->getCommandLength(Command::RFMAB) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 15, static_cast<int>(lround(memSpec->getCommandLength(Command::PDEA) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 16, static_cast<int>(lround(memSpec->getCommandLength(Command::PDXA) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 17, static_cast<int>(lround(memSpec->getCommandLength(Command::PDEP) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 18, static_cast<int>(lround(memSpec->getCommandLength(Command::PDXP) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 19, static_cast<int>(lround(memSpec->getCommandLength(Command::SREFEN) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 20, static_cast<int>(lround(memSpec->getCommandLength(Command::SREFEX) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 9, static_cast<int>(lround(memSpec->getCommandLength(Command::RFMPB) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 10, static_cast<int>(lround(memSpec->getCommandLength(Command::REFP2B) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 11, static_cast<int>(lround(memSpec->getCommandLength(Command::RFMP2B) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 12, static_cast<int>(lround(memSpec->getCommandLength(Command::PRESB) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 13, static_cast<int>(lround(memSpec->getCommandLength(Command::REFSB) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 14, static_cast<int>(lround(memSpec->getCommandLength(Command::RFMSB) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 15, static_cast<int>(lround(memSpec->getCommandLength(Command::PREAB) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 16, static_cast<int>(lround(memSpec->getCommandLength(Command::REFAB) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 17, static_cast<int>(lround(memSpec->getCommandLength(Command::RFMAB) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 18, static_cast<int>(lround(memSpec->getCommandLength(Command::PDEA) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 19, static_cast<int>(lround(memSpec->getCommandLength(Command::PDXA) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 20, static_cast<int>(lround(memSpec->getCommandLength(Command::PDEP) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 21, static_cast<int>(lround(memSpec->getCommandLength(Command::PDXP) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 22, static_cast<int>(lround(memSpec->getCommandLength(Command::SREFEN) / memSpec->tCK)));
|
||||
sqlite3_bind_int(insertCommandLengthsStatement, 23, static_cast<int>(lround(memSpec->getCommandLength(Command::SREFEX) / memSpec->tCK)));
|
||||
|
||||
executeSqlStatement(insertCommandLengthsStatement);
|
||||
}
|
||||
|
||||
@@ -60,10 +60,12 @@ public:
|
||||
{
|
||||
mcconfig = std::move(_mcconfig);
|
||||
}
|
||||
|
||||
void recordMemspec(std::string _memspec)
|
||||
{
|
||||
memspec = std::move(_memspec);
|
||||
}
|
||||
|
||||
void recordTraceNames(std::string _traces)
|
||||
{
|
||||
traces = std::move(_traces);
|
||||
@@ -179,10 +181,11 @@ private:
|
||||
" Memspec TEXT, \n"
|
||||
" Traces TEXT, \n"
|
||||
" WindowSize INTEGER, \n"
|
||||
" FlexibleRefresh INTEGER, \n"
|
||||
" MaxRefBurst INTEGER, \n"
|
||||
" RefreshMaxPostponed INTEGER, \n"
|
||||
" RefreshMaxPulledin INTEGER, \n"
|
||||
" ControllerThread INTEGER, \n"
|
||||
" MaxBufferDepth INTEGER \n"
|
||||
" MaxBufferDepth INTEGER, \n"
|
||||
" Per2BankOffset INTEGER \n"
|
||||
"); \n"
|
||||
" \n"
|
||||
"CREATE TABLE CommandLengths( \n"
|
||||
@@ -192,13 +195,16 @@ private:
|
||||
" RDA INTEGER, \n"
|
||||
" WRA INTEGER, \n"
|
||||
" ACT INTEGER, \n"
|
||||
" PRE INTEGER, \n"
|
||||
" REFB INTEGER, \n"
|
||||
" PREPB INTEGER, \n"
|
||||
" REFPB INTEGER, \n"
|
||||
" RFMPB INTEGER, \n"
|
||||
" REFP2B INTEGER, \n"
|
||||
" RFMP2B INTEGER, \n"
|
||||
" PRESB INTEGER, \n"
|
||||
" REFSB INTEGER, \n"
|
||||
" RFMSB INTEGER, \n"
|
||||
" PREA INTEGER, \n"
|
||||
" REFA INTEGER, \n"
|
||||
" PREAB INTEGER, \n"
|
||||
" REFAB INTEGER, \n"
|
||||
" RFMAB INTEGER, \n"
|
||||
" PDEA INTEGER, \n"
|
||||
" PDXA INTEGER, \n"
|
||||
|
||||
@@ -80,10 +80,9 @@ MemSpecGDDR6::MemSpecGDDR6(json &memspec)
|
||||
tCKESR (tCK * parseUint(memspec["memtimingspec"], "CKESR")),
|
||||
tXP (tCK * parseUint(memspec["memtimingspec"], "XP")),
|
||||
tREFI (tCK * parseUint(memspec["memtimingspec"], "REFI")),
|
||||
tREFIPB (tCK * parseUint(memspec["memtimingspec"], "REFIPB")),
|
||||
tREFIP2B (tCK * parseUint(memspec["memtimingspec"], "REFIP2B")),
|
||||
tRFC (tCK * parseUint(memspec["memtimingspec"], "RFC")),
|
||||
tRFCPB (tCK * parseUint(memspec["memtimingspec"], "RFCPB")),
|
||||
tREFIpb (tCK * parseUint(memspec["memtimingspec"], "REFIpb")),
|
||||
tRFCab (tCK * parseUint(memspec["memtimingspec"], "RFCab")),
|
||||
tRFCpb (tCK * parseUint(memspec["memtimingspec"], "RFCpb")),
|
||||
tRREFD (tCK * parseUint(memspec["memtimingspec"], "RREFD")),
|
||||
tXS (tCK * parseUint(memspec["memtimingspec"], "XS")),
|
||||
tFAW (tCK * parseUint(memspec["memtimingspec"], "FAW")),
|
||||
@@ -121,12 +120,12 @@ sc_time MemSpecGDDR6::getRefreshIntervalAB() const
|
||||
|
||||
sc_time MemSpecGDDR6::getRefreshIntervalPB() const
|
||||
{
|
||||
return tREFIPB;
|
||||
return tREFIpb;
|
||||
}
|
||||
|
||||
sc_time MemSpecGDDR6::getRefreshIntervalP2B() const
|
||||
{
|
||||
return tREFIP2B;
|
||||
return tREFIpb;
|
||||
}
|
||||
|
||||
unsigned MemSpecGDDR6::getPer2BankOffset() const
|
||||
@@ -154,9 +153,9 @@ sc_time MemSpecGDDR6::getExecutionTime(Command command, const tlm_generic_payloa
|
||||
else if (command == Command::WRA)
|
||||
return tWL + burstDuration + tWR + tRP;
|
||||
else if (command == Command::REFAB)
|
||||
return tRFC;
|
||||
else if (command == Command::REFPB)
|
||||
return tRFCPB;
|
||||
return tRFCab;
|
||||
else if (command == Command::REFPB || command == Command::REFP2B)
|
||||
return tRFCpb;
|
||||
else
|
||||
{
|
||||
SC_REPORT_FATAL("getExecutionTime",
|
||||
|
||||
@@ -70,10 +70,9 @@ public:
|
||||
const sc_core::sc_time tCKESR;
|
||||
const sc_core::sc_time tXP;
|
||||
const sc_core::sc_time tREFI;
|
||||
const sc_core::sc_time tREFIPB;
|
||||
const sc_core::sc_time tREFIP2B;
|
||||
const sc_core::sc_time tRFC;
|
||||
const sc_core::sc_time tRFCPB;
|
||||
const sc_core::sc_time tREFIpb;
|
||||
const sc_core::sc_time tRFCab;
|
||||
const sc_core::sc_time tRFCpb;
|
||||
const sc_core::sc_time tRREFD;
|
||||
const sc_core::sc_time tXS;
|
||||
const sc_core::sc_time tFAW;
|
||||
|
||||
@@ -124,16 +124,16 @@ tlm_phase Command::toPhase() const
|
||||
BEGIN_RDA, // 3
|
||||
BEGIN_WRA, // 4
|
||||
BEGIN_ACT, // 5
|
||||
BEGIN_PRE, // 6
|
||||
BEGIN_REFB, // 7
|
||||
BEGIN_PREPB, // 6
|
||||
BEGIN_REFPB, // 7
|
||||
BEGIN_RFMPB, // 8
|
||||
BEGIN_REFP2B, // 9
|
||||
BEGIN_RFMP2B, // 10
|
||||
BEGIN_PRESB, // 11
|
||||
BEGIN_REFSB, // 12
|
||||
BEGIN_RFMSB, // 13
|
||||
BEGIN_PREA, // 14
|
||||
BEGIN_REFA, // 15
|
||||
BEGIN_PREAB, // 14
|
||||
BEGIN_REFAB, // 15
|
||||
BEGIN_RFMAB, // 16
|
||||
BEGIN_PDNA, // 17
|
||||
BEGIN_PDNP, // 18
|
||||
|
||||
@@ -58,16 +58,16 @@ DECLARE_EXTENDED_PHASE(BEGIN_WR); // 7
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_RDA); // 8
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_WRA); // 9
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_ACT); // 10
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_PRE); // 11
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_REFB); // 12
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_PREPB); // 11
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_REFPB); // 12
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_RFMPB); // 13
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_REFP2B); // 14
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_RFMP2B); // 15
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_PRESB); // 16
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_REFSB); // 17
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_RFMSB); // 18
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_PREA); // 19
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_REFA); // 20
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_PREAB); // 19
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_REFAB); // 20
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_RFMAB); // 21
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_PDNA); // 22
|
||||
DECLARE_EXTENDED_PHASE(BEGIN_PDNP); // 23
|
||||
@@ -83,16 +83,16 @@ DECLARE_EXTENDED_PHASE(END_WR); // 30
|
||||
DECLARE_EXTENDED_PHASE(END_RDA); // 31
|
||||
DECLARE_EXTENDED_PHASE(END_WRA); // 32
|
||||
DECLARE_EXTENDED_PHASE(END_ACT); // 33
|
||||
DECLARE_EXTENDED_PHASE(END_PRE); // 34
|
||||
DECLARE_EXTENDED_PHASE(END_REFB); // 35
|
||||
DECLARE_EXTENDED_PHASE(END_PREPB); // 34
|
||||
DECLARE_EXTENDED_PHASE(END_REFPB); // 35
|
||||
DECLARE_EXTENDED_PHASE(END_RFMPB); // 36
|
||||
DECLARE_EXTENDED_PHASE(END_REFP2B); // 37
|
||||
DECLARE_EXTENDED_PHASE(END_RFMP2B); // 38
|
||||
DECLARE_EXTENDED_PHASE(END_PRESB); // 39
|
||||
DECLARE_EXTENDED_PHASE(END_REFSB); // 40
|
||||
DECLARE_EXTENDED_PHASE(END_RFMSB); // 41
|
||||
DECLARE_EXTENDED_PHASE(END_PREA); // 42
|
||||
DECLARE_EXTENDED_PHASE(END_REFA); // 43
|
||||
DECLARE_EXTENDED_PHASE(END_PREAB); // 42
|
||||
DECLARE_EXTENDED_PHASE(END_REFAB); // 43
|
||||
DECLARE_EXTENDED_PHASE(END_RFMAB); // 44
|
||||
|
||||
class Command
|
||||
|
||||
@@ -240,11 +240,11 @@ sc_time CheckerGDDR6::timeToSatisfyConstraints(Command command, tlm_generic_payl
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndRank[Command::REFAB][rank.ID()];
|
||||
if (lastCommandStart != sc_max_time())
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFC);
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFCab);
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndBank[Command::REFPB][bank.ID()];
|
||||
if (lastCommandStart != sc_max_time())
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFCPB);
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFCpb);
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndRank[Command::REFPB][rank.ID()];
|
||||
if (lastCommandStart != sc_max_time())
|
||||
@@ -311,7 +311,7 @@ sc_time CheckerGDDR6::timeToSatisfyConstraints(Command command, tlm_generic_payl
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndRank[Command::REFPB][rank.ID()];
|
||||
if (lastCommandStart != sc_max_time())
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFCPB);
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFCpb);
|
||||
}
|
||||
else if (command == Command::REFAB)
|
||||
{
|
||||
@@ -341,11 +341,11 @@ sc_time CheckerGDDR6::timeToSatisfyConstraints(Command command, tlm_generic_payl
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndRank[Command::REFAB][rank.ID()];
|
||||
if (lastCommandStart != sc_max_time())
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFC);
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFCab);
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndRank[Command::REFPB][rank.ID()];
|
||||
if (lastCommandStart != sc_max_time())
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFCPB);
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFCpb);
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndRank[Command::SREFEX][rank.ID()];
|
||||
if (lastCommandStart != sc_max_time())
|
||||
@@ -391,17 +391,17 @@ sc_time CheckerGDDR6::timeToSatisfyConstraints(Command command, tlm_generic_payl
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndRank[Command::REFAB][rank.ID()];
|
||||
if (lastCommandStart != sc_max_time())
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFC);
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFCab);
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndBank[Command::REFPB][bank.ID()];
|
||||
if (lastCommandStart != sc_max_time())
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFCPB);
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFCpb);
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndRank[Command::REFPB][rank.ID()];
|
||||
if (lastCommandStart != sc_max_time())
|
||||
{
|
||||
if (bankwiseRefreshCounter[rank.ID()] == 0)
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFCPB);
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFCpb);
|
||||
else
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRREFD);
|
||||
}
|
||||
@@ -529,11 +529,11 @@ sc_time CheckerGDDR6::timeToSatisfyConstraints(Command command, tlm_generic_payl
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndRank[Command::REFAB][rank.ID()];
|
||||
if (lastCommandStart != sc_max_time())
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFC);
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFCab);
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndRank[Command::REFPB][rank.ID()];
|
||||
if (lastCommandStart != sc_max_time())
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFCPB);
|
||||
earliestTimeToStart = std::max(earliestTimeToStart, lastCommandStart + memSpec->tRFCpb);
|
||||
|
||||
lastCommandStart = lastScheduledByCommandAndRank[Command::SREFEX][rank.ID()];
|
||||
if (lastCommandStart != sc_max_time())
|
||||
|
||||
@@ -64,7 +64,7 @@ protected:
|
||||
|
||||
unsigned char *memory;
|
||||
|
||||
libDRAMPower *DRAMPower;
|
||||
libDRAMPower *DRAMPower = nullptr;
|
||||
|
||||
virtual tlm::tlm_sync_enum nb_transport_fw(tlm::tlm_generic_payload &payload,
|
||||
tlm::tlm_phase &phase, sc_core::sc_time &delay);
|
||||
|
||||
@@ -211,7 +211,7 @@ tlm_sync_enum DramWideIO::nb_transport_fw(tlm_generic_payload &payload,
|
||||
ememory[bank]->load(payload);
|
||||
else if (phase == BEGIN_WR || phase == BEGIN_WRA)
|
||||
ememory[bank]->store(payload);
|
||||
else if (phase == BEGIN_REFA)
|
||||
else if (phase == BEGIN_REFAB)
|
||||
ememory[bank]->refresh(DramExtension::getExtension(payload).getRow().ID());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user