Removed nextRow in BankMachine.
This commit is contained in:
@@ -55,7 +55,7 @@ void BankMachine::updateState(Command command)
|
||||
if (command == Command::ACT)
|
||||
{
|
||||
currentState = BmState::Activated;
|
||||
currentRow = nextRow;
|
||||
currentRow = DramExtension::getRow(currentPayload);
|
||||
}
|
||||
else if (command == Command::PRE || command == Command::PREA)
|
||||
currentState = BmState::Precharged;
|
||||
@@ -124,16 +124,14 @@ sc_time BankMachineOpen::start()
|
||||
return sc_max_time() - sc_time_stamp();
|
||||
}
|
||||
sc_time delay;
|
||||
DramExtension extension = DramExtension::getExtension(currentPayload);
|
||||
if (currentState == BmState::Precharged) // row miss
|
||||
{
|
||||
delay = checker->delayToSatisfyConstraints(Command::ACT, rank, bankgroup, bank);
|
||||
nextCommand = Command::ACT;
|
||||
nextRow = extension.getRow();
|
||||
}
|
||||
else if (currentState == BmState::Activated)
|
||||
{
|
||||
if (extension.getRow() == currentRow) // row hit
|
||||
if (DramExtension::getRow(currentPayload) == currentRow) // row hit
|
||||
{
|
||||
if (currentPayload->get_command() == TLM_READ_COMMAND)
|
||||
{
|
||||
@@ -152,7 +150,6 @@ sc_time BankMachineOpen::start()
|
||||
{
|
||||
delay = checker->delayToSatisfyConstraints(Command::PRE, rank, bankgroup, bank);
|
||||
nextCommand = Command::PRE;
|
||||
nextRow = extension.getRow();
|
||||
}
|
||||
}
|
||||
timeToSchedule = sc_time_stamp() + delay;
|
||||
@@ -175,16 +172,14 @@ sc_time BankMachineClosed::start()
|
||||
return sc_max_time() - sc_time_stamp();
|
||||
}
|
||||
sc_time delay;
|
||||
DramExtension extension = DramExtension::getExtension(currentPayload);
|
||||
if (currentState == BmState::Precharged) // row miss
|
||||
{
|
||||
delay = checker->delayToSatisfyConstraints(Command::ACT, rank, bankgroup, bank);
|
||||
nextCommand = Command::ACT;
|
||||
nextRow = extension.getRow();
|
||||
}
|
||||
else if (currentState == BmState::Activated)
|
||||
{
|
||||
if (extension.getRow() == currentRow) // row hit
|
||||
if (DramExtension::getRow(currentPayload) == currentRow) // row hit
|
||||
{
|
||||
if (currentPayload->get_command() == TLM_READ_COMMAND)
|
||||
{
|
||||
@@ -203,7 +198,6 @@ sc_time BankMachineClosed::start()
|
||||
{
|
||||
delay = checker->delayToSatisfyConstraints(Command::PRE, rank, bankgroup, bank);
|
||||
nextCommand = Command::PRE;
|
||||
nextRow = extension.getRow();
|
||||
}
|
||||
}
|
||||
timeToSchedule = sc_time_stamp() + delay;
|
||||
@@ -226,16 +220,14 @@ sc_time BankMachineOpenAdaptive::start()
|
||||
return sc_max_time() - sc_time_stamp();
|
||||
}
|
||||
sc_time delay;
|
||||
DramExtension extension = DramExtension::getExtension(currentPayload);
|
||||
if (currentState == BmState::Precharged) // row miss
|
||||
{
|
||||
delay = checker->delayToSatisfyConstraints(Command::ACT, rank, bankgroup, bank);
|
||||
nextCommand = Command::ACT;
|
||||
nextRow = extension.getRow();
|
||||
}
|
||||
else if (currentState == BmState::Activated)
|
||||
{
|
||||
if (extension.getRow() == currentRow) // row hit
|
||||
if (DramExtension::getRow(currentPayload) == currentRow) // row hit
|
||||
{
|
||||
if (scheduler->hasRequest(bank) && !scheduler->hasRowHit(bank, currentRow))
|
||||
{
|
||||
@@ -272,7 +264,6 @@ sc_time BankMachineOpenAdaptive::start()
|
||||
{
|
||||
delay = checker->delayToSatisfyConstraints(Command::PRE, rank, bankgroup, bank);
|
||||
nextCommand = Command::PRE;
|
||||
nextRow = extension.getRow();
|
||||
}
|
||||
}
|
||||
timeToSchedule = sc_time_stamp() + delay;
|
||||
@@ -295,16 +286,14 @@ sc_time BankMachineClosedAdaptive::start()
|
||||
return sc_max_time() - sc_time_stamp();
|
||||
}
|
||||
sc_time delay;
|
||||
DramExtension extension = DramExtension::getExtension(currentPayload);
|
||||
if (currentState == BmState::Precharged) // row miss
|
||||
{
|
||||
delay = checker->delayToSatisfyConstraints(Command::ACT, rank, bankgroup, bank);
|
||||
nextCommand = Command::ACT;
|
||||
nextRow = extension.getRow();
|
||||
}
|
||||
else if (currentState == BmState::Activated)
|
||||
{
|
||||
if (extension.getRow() == currentRow) // row hit
|
||||
if (DramExtension::getRow(currentPayload) == currentRow) // row hit
|
||||
{
|
||||
if (scheduler->hasRowHit(bank, currentRow))
|
||||
{
|
||||
@@ -341,7 +330,6 @@ sc_time BankMachineClosedAdaptive::start()
|
||||
{
|
||||
delay = checker->delayToSatisfyConstraints(Command::PRE, rank, bankgroup, bank);
|
||||
nextCommand = Command::PRE;
|
||||
nextRow = extension.getRow();
|
||||
SC_REPORT_FATAL("BankMachine", "Should never be reached for this policy");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,6 @@ protected:
|
||||
SchedulerIF *scheduler;
|
||||
CheckerIF *checker;
|
||||
Command nextCommand;
|
||||
Row nextRow;
|
||||
BmState currentState = BmState::Precharged;
|
||||
Row currentRow;
|
||||
sc_time timeToSchedule = sc_max_time();
|
||||
|
||||
Reference in New Issue
Block a user