Implement Partial Write for DDR5
This commit is contained in:
@@ -148,7 +148,7 @@ bool MemSpec::hasRasAndCasBus() const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MemSpec::requiresReadModifyWrite(const tlm::tlm_generic_payload& payload) const
|
||||
bool MemSpec::requiresMaskedWrite(const tlm::tlm_generic_payload& payload) const
|
||||
{
|
||||
return payload.get_byte_enable_ptr() != nullptr;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
virtual sc_core::sc_time getExecutionTime(Command command, const tlm::tlm_generic_payload& payload) const = 0;
|
||||
virtual TimeInterval getIntervalOnDataStrobe(Command command, const tlm::tlm_generic_payload& payload) const = 0;
|
||||
|
||||
virtual bool requiresReadModifyWrite(const tlm::tlm_generic_payload& payload) const;
|
||||
virtual bool requiresMaskedWrite(const tlm::tlm_generic_payload& payload) const;
|
||||
|
||||
sc_core::sc_time getCommandLength(Command) const;
|
||||
double getCommandLengthInCycles(Command) const;
|
||||
|
||||
@@ -70,11 +70,11 @@ void BankMachine::update(Command command)
|
||||
state = State::Precharged;
|
||||
keepTrans = false;
|
||||
break;
|
||||
case Command::RD: case Command::WR:
|
||||
case Command::RD: case Command::WR: case Command::MWR:
|
||||
currentPayload = nullptr;
|
||||
keepTrans = false;
|
||||
break;
|
||||
case Command::RDA: case Command::WRA:
|
||||
case Command::RDA: case Command::WRA: case Command::MWRA:
|
||||
state = State::Precharged;
|
||||
currentPayload = nullptr;
|
||||
keepTrans = false;
|
||||
@@ -201,7 +201,7 @@ void BankMachineOpen::evaluate()
|
||||
nextCommand = Command::RD;
|
||||
else
|
||||
{
|
||||
nextCommand = memSpec.requiresReadModifyWrite(*currentPayload) ? Command::MWR : Command::WR;
|
||||
nextCommand = memSpec.requiresMaskedWrite(*currentPayload) ? Command::MWR : Command::WR;
|
||||
}
|
||||
}
|
||||
else // row miss
|
||||
@@ -247,7 +247,7 @@ void BankMachineClosed::evaluate()
|
||||
nextCommand = Command::RDA;
|
||||
else
|
||||
{
|
||||
nextCommand = memSpec.requiresReadModifyWrite(*currentPayload) ? Command::MWRA : Command::WRA;
|
||||
nextCommand = memSpec.requiresMaskedWrite(*currentPayload) ? Command::MWRA : Command::WRA;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -295,7 +295,7 @@ void BankMachineOpenAdaptive::evaluate()
|
||||
nextCommand = Command::RDA;
|
||||
else
|
||||
{
|
||||
nextCommand = memSpec.requiresReadModifyWrite(*currentPayload) ? Command::MWRA : Command::WRA;
|
||||
nextCommand = memSpec.requiresMaskedWrite(*currentPayload) ? Command::MWRA : Command::WRA;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -305,7 +305,7 @@ void BankMachineOpenAdaptive::evaluate()
|
||||
nextCommand = Command::RD;
|
||||
else
|
||||
{
|
||||
nextCommand = memSpec.requiresReadModifyWrite(*currentPayload) ? Command::MWR : Command::WR;
|
||||
nextCommand = memSpec.requiresMaskedWrite(*currentPayload) ? Command::MWR : Command::WR;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -357,7 +357,7 @@ void BankMachineClosedAdaptive::evaluate()
|
||||
nextCommand = Command::RD;
|
||||
else
|
||||
{
|
||||
nextCommand = memSpec.requiresReadModifyWrite(*currentPayload) ? Command::MWR : Command::WR;
|
||||
nextCommand = memSpec.requiresMaskedWrite(*currentPayload) ? Command::MWR : Command::WR;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -367,7 +367,7 @@ void BankMachineClosedAdaptive::evaluate()
|
||||
nextCommand = Command::RDA;
|
||||
else
|
||||
{
|
||||
nextCommand = memSpec.requiresReadModifyWrite(*currentPayload) ? Command::MWRA : Command::WRA;
|
||||
nextCommand = memSpec.requiresMaskedWrite(*currentPayload) ? Command::MWRA : Command::WRA;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ void RefreshManagerAllBank::update(Command command)
|
||||
case Command::ACT:
|
||||
activatedBanks++;
|
||||
break;
|
||||
case Command::PREPB: case Command::RDA: case Command::WRA:
|
||||
case Command::PREPB: case Command::RDA: case Command::WRA: case Command::MWRA:
|
||||
activatedBanks--;
|
||||
break;
|
||||
case Command::PREAB:
|
||||
|
||||
Reference in New Issue
Block a user