length on data strobe different for double data rate and single data rate
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "ScheduledCommand.h"
|
||||
#include "../utils/Utils.h"
|
||||
#include "../../common/Utils.h"
|
||||
#include "../configuration/Configuration.h"
|
||||
|
||||
namespace core {
|
||||
|
||||
@@ -82,5 +83,33 @@ bool ScheduledCommand::commandIsIn(const std::vector<Command>& commandSet) const
|
||||
return isIn(command, commandSet);
|
||||
}
|
||||
|
||||
TimeInterval ScheduledCommand::getIntervalOnDataStrobe() const
|
||||
{
|
||||
sc_assert(
|
||||
getCommand() == Command::Read || getCommand() == Command::ReadA
|
||||
|| getCommand() == Command::Write
|
||||
|| getCommand() == Command::WriteA);
|
||||
|
||||
TimingConfiguration& timings = Configuration::getInstance().Timings;
|
||||
|
||||
sc_time burstLengthOnDataStrobe = getBurstLengthOnDataStrobe(getBurstLength());
|
||||
|
||||
if (getCommand() == Command::Read || getCommand() == Command::ReadA)
|
||||
{
|
||||
return TimeInterval(getStart() + timings.tRL,
|
||||
getStart() + timings.tRL + burstLengthOnDataStrobe);
|
||||
}
|
||||
else
|
||||
{
|
||||
return TimeInterval(getStart() + timings.tWL - timings.clk / 2,
|
||||
getStart() + timings.tWL + burstLengthOnDataStrobe - timings.clk / 2);
|
||||
}
|
||||
}
|
||||
|
||||
bool ScheduledCommand::collidesOnDataStrobe(const ScheduledCommand& cmd) const
|
||||
{
|
||||
return cmd.getIntervalOnDataStrobe().intersects(getIntervalOnDataStrobe());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user