Reset cmd and time to schedule when BM is blocked.
This commit is contained in:
@@ -116,6 +116,8 @@ uint64_t BankMachine::getRefreshManagementCounter() const
|
||||
void BankMachine::block()
|
||||
{
|
||||
blocked = true;
|
||||
timeToSchedule = sc_max_time();
|
||||
nextCommand = Command::NOP;
|
||||
}
|
||||
|
||||
Rank BankMachine::getRank() const
|
||||
@@ -167,9 +169,9 @@ sc_time BankMachineOpen::start()
|
||||
{
|
||||
if (DramExtension::getRow(currentPayload) == openRow) // row hit
|
||||
{
|
||||
if (currentPayload->get_command() == TLM_READ_COMMAND)
|
||||
if (currentPayload->is_read())
|
||||
nextCommand = Command::RD;
|
||||
else if (currentPayload->get_command() == TLM_WRITE_COMMAND)
|
||||
else if (currentPayload->is_write())
|
||||
nextCommand = Command::WR;
|
||||
else
|
||||
SC_REPORT_FATAL("BankMachine", "Wrong TLM command");
|
||||
@@ -200,9 +202,9 @@ sc_time BankMachineClosed::start()
|
||||
nextCommand = Command::ACT;
|
||||
else if (state == State::Activated)
|
||||
{
|
||||
if (currentPayload->get_command() == TLM_READ_COMMAND)
|
||||
if (currentPayload->is_read())
|
||||
nextCommand = Command::RDA;
|
||||
else if (currentPayload->get_command() == TLM_WRITE_COMMAND)
|
||||
else if (currentPayload->is_write())
|
||||
nextCommand = Command::WRA;
|
||||
else
|
||||
SC_REPORT_FATAL("BankMachine", "Wrong TLM command");
|
||||
@@ -234,18 +236,18 @@ sc_time BankMachineOpenAdaptive::start()
|
||||
{
|
||||
if (scheduler->hasFurtherRequest(bank) && !scheduler->hasFurtherRowHit(bank, openRow))
|
||||
{
|
||||
if (currentPayload->get_command() == TLM_READ_COMMAND)
|
||||
if (currentPayload->is_read())
|
||||
nextCommand = Command::RDA;
|
||||
else if (currentPayload->get_command() == TLM_WRITE_COMMAND)
|
||||
else if (currentPayload->is_write())
|
||||
nextCommand = Command::WRA;
|
||||
else
|
||||
SC_REPORT_FATAL("BankMachine", "Wrong TLM command");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (currentPayload->get_command() == TLM_READ_COMMAND)
|
||||
if (currentPayload->is_read())
|
||||
nextCommand = Command::RD;
|
||||
else if (currentPayload->get_command() == TLM_WRITE_COMMAND)
|
||||
else if (currentPayload->is_write())
|
||||
nextCommand = Command::WR;
|
||||
else
|
||||
SC_REPORT_FATAL("BankMachine", "Wrong TLM command");
|
||||
@@ -281,18 +283,18 @@ sc_time BankMachineClosedAdaptive::start()
|
||||
{
|
||||
if (scheduler->hasFurtherRowHit(bank, openRow))
|
||||
{
|
||||
if (currentPayload->get_command() == TLM_READ_COMMAND)
|
||||
if (currentPayload->is_read())
|
||||
nextCommand = Command::RD;
|
||||
else if (currentPayload->get_command() == TLM_WRITE_COMMAND)
|
||||
else if (currentPayload->is_write())
|
||||
nextCommand = Command::WR;
|
||||
else
|
||||
SC_REPORT_FATAL("BankMachine", "Wrong TLM command");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (currentPayload->get_command() == TLM_READ_COMMAND)
|
||||
if (currentPayload->is_read())
|
||||
nextCommand = Command::RDA;
|
||||
else if (currentPayload->get_command() == TLM_WRITE_COMMAND)
|
||||
else if (currentPayload->is_write())
|
||||
nextCommand = Command::WRA;
|
||||
else
|
||||
SC_REPORT_FATAL("BankMachine", "Wrong TLM command");
|
||||
|
||||
Reference in New Issue
Block a user