burstlength fix ddr4
This commit is contained in:
@@ -63,17 +63,22 @@ sc_time getExecutionTime(Command command,tlm::tlm_generic_payload& payload)
|
||||
}
|
||||
else if(command == Command::Write || command == Command::WriteA)
|
||||
{
|
||||
sc_time lengthOnDataStrobe = getBurstLengthOnDataStrobe(payload.get_streaming_width());
|
||||
if(Configuration::getInstance().DataRate == 1)
|
||||
lengthOnDataStrobe -= Configuration::getInstance().Timings.clk;
|
||||
sc_time lockTime;;
|
||||
Configuration& config = Configuration::getInstance();
|
||||
if(config.DataRate == 1)
|
||||
lockTime = getBurstLengthOnDataStrobe(payload.get_streaming_width()) - config.Timings.clk;
|
||||
else //special case DDR4 -> always 4 clocks
|
||||
{
|
||||
lockTime = config.Timings.clk * config.BurstLength / config.DataRate;
|
||||
}
|
||||
|
||||
if (command == Command::Write)
|
||||
{
|
||||
return config.tWL + lengthOnDataStrobe;
|
||||
return config.Timings.tWL + lockTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
return config.tWL + lengthOnDataStrobe + config.tWR;
|
||||
return config.Timings.tWL + lockTime + config.Timings.tWR;
|
||||
}
|
||||
}
|
||||
else if(command == Command::PrechargeAll)
|
||||
|
||||
Reference in New Issue
Block a user