Invalid commands are ignored.
The data structure that stores last commands is initialized with NOPs. So it is possible to get a NOP as return of state.getLastScheduledCommand(bank).
This commit is contained in:
@@ -80,14 +80,17 @@ void PowerDownChecker::delayToSatisfyConstraints(ScheduledCommand &command) cons
|
||||
|
||||
// Get the last scheduled command on this bank
|
||||
ScheduledCommand lastSchedCmdOnBank = state.getLastScheduledCommand(bank);
|
||||
// Get the start time for the last scheduled command on this bank
|
||||
sc_time lastSchedCmdOnBankStart = lastSchedCmdOnBank.getStart();
|
||||
// Get the last command on this bank itself
|
||||
Command lastCmdBank = lastSchedCmdOnBank.getCommand();
|
||||
|
||||
timeConstraint = getTimeConstraintToEnterPowerDown(lastCmdBank, pdnCmd);
|
||||
if (lastSchedCmdOnBank.isValidCommand()) {
|
||||
// Get the start time for the last scheduled command on this bank
|
||||
sc_time lastSchedCmdOnBankStart = lastSchedCmdOnBank.getStart();
|
||||
// Get the last command on this bank itself
|
||||
Command lastCmdBank = lastSchedCmdOnBank.getCommand();
|
||||
|
||||
command.establishMinDistanceFromStart(lastSchedCmdOnBankStart, timeConstraint);
|
||||
timeConstraint = getTimeConstraintToEnterPowerDown(lastCmdBank, pdnCmd);
|
||||
|
||||
command.establishMinDistanceFromStart(lastSchedCmdOnBankStart, timeConstraint);
|
||||
}
|
||||
|
||||
} else if (pdnCmd == Command::PDNAX) {
|
||||
// Leaving Active Power Down
|
||||
|
||||
Reference in New Issue
Block a user