if (next_tick == curTick) {
cpu->completeDataAccess(pkt);
} else {
- tickEvent.schedule(pkt, next_tick);
+ if (!tickEvent.scheduled()) {
+ tickEvent.schedule(pkt, next_tick);
+ } else {
+ // In the case of a split transaction and a cache that is
+ // faster than a CPU we could get two responses before
+ // next_tick expires
+ if (!retryEvent.scheduled())
+ schedule(retryEvent, next_tick);
+ return false;
+ }
}
return true;
public:
CpuPort(const std::string &_name, TimingSimpleCPU *_cpu, Tick _lat)
- : Port(_name, _cpu), cpu(_cpu), lat(_lat)
+ : Port(_name, _cpu), cpu(_cpu), lat(_lat), retryEvent(this)
{ }
bool snoopRangeSent;
{
PacketPtr pkt;
TimingSimpleCPU *cpu;
+ CpuPort *port;
TickEvent(TimingSimpleCPU *_cpu) : cpu(_cpu) {}
const char *description() const { return "Timing CPU tick"; }
void schedule(PacketPtr _pkt, Tick t);
};
+ EventWrapper<Port, &Port::sendRetry> retryEvent;
};
class IcachePort : public CpuPort