Fixed BM deadlock.
This commit is contained in:
@@ -112,12 +112,15 @@ BankMachineOpen::BankMachineOpen(SchedulerIF *scheduler, CheckerIF *checker, Ban
|
||||
|
||||
sc_time BankMachineOpen::start()
|
||||
{
|
||||
if (currentPayload == nullptr)
|
||||
if (blocked)
|
||||
return sc_max_time() - sc_time_stamp();
|
||||
else if (currentPayload == nullptr)
|
||||
{
|
||||
currentPayload = scheduler->getNextRequest(this);
|
||||
if (currentPayload == nullptr)
|
||||
return sc_max_time() - sc_time_stamp();
|
||||
}
|
||||
|
||||
sc_time delay;
|
||||
DramExtension extension = DramExtension::getExtension(currentPayload);
|
||||
if (currentState == BmState::Precharged) // row miss
|
||||
@@ -159,12 +162,15 @@ BankMachineClosed::BankMachineClosed(SchedulerIF *scheduler, CheckerIF *checker,
|
||||
|
||||
sc_time BankMachineClosed::start()
|
||||
{
|
||||
if (currentPayload == nullptr)
|
||||
if (blocked)
|
||||
return sc_max_time() - sc_time_stamp();
|
||||
else if (currentPayload == nullptr)
|
||||
{
|
||||
currentPayload = scheduler->getNextRequest(this);
|
||||
if (currentPayload == nullptr)
|
||||
return sc_max_time() - sc_time_stamp();
|
||||
}
|
||||
|
||||
sc_time delay;
|
||||
DramExtension extension = DramExtension::getExtension(currentPayload);
|
||||
if (currentState == BmState::Precharged) // row miss
|
||||
@@ -206,12 +212,15 @@ BankMachineOpenAdaptive::BankMachineOpenAdaptive(SchedulerIF *scheduler, Checker
|
||||
|
||||
sc_time BankMachineOpenAdaptive::start()
|
||||
{
|
||||
if (currentPayload == nullptr)
|
||||
if (blocked)
|
||||
return sc_max_time() - sc_time_stamp();
|
||||
else if (currentPayload == nullptr)
|
||||
{
|
||||
currentPayload = scheduler->getNextRequest(this);
|
||||
if (currentPayload == nullptr)
|
||||
return sc_max_time() - sc_time_stamp();
|
||||
}
|
||||
|
||||
sc_time delay;
|
||||
DramExtension extension = DramExtension::getExtension(currentPayload);
|
||||
if (currentState == BmState::Precharged) // row miss
|
||||
@@ -271,12 +280,15 @@ BankMachineClosedAdaptive::BankMachineClosedAdaptive(SchedulerIF *scheduler, Che
|
||||
|
||||
sc_time BankMachineClosedAdaptive::start()
|
||||
{
|
||||
if (currentPayload == nullptr)
|
||||
if (blocked)
|
||||
return sc_max_time() - sc_time_stamp();
|
||||
else if (currentPayload == nullptr)
|
||||
{
|
||||
currentPayload = scheduler->getNextRequest(this);
|
||||
if (currentPayload == nullptr)
|
||||
return sc_max_time() - sc_time_stamp();
|
||||
}
|
||||
|
||||
sc_time delay;
|
||||
DramExtension extension = DramExtension::getExtension(currentPayload);
|
||||
if (currentState == BmState::Precharged) // row miss
|
||||
|
||||
@@ -201,8 +201,7 @@ void RefreshManagerBankwise::updateState(Command command, tlm_generic_payload *p
|
||||
}
|
||||
else if (command == Command::PRE)
|
||||
{
|
||||
if (nextCommand == Command::PRE && state == RmState::Regular
|
||||
&& DramExtension::getBank(payload) == currentBankMachine->getBank())
|
||||
if (nextCommand == Command::PRE && DramExtension::getBank(payload) == currentBankMachine->getBank())
|
||||
{
|
||||
currentBankMachine->block();
|
||||
state = RmState::Precharged;
|
||||
|
||||
Reference in New Issue
Block a user