BaseCache::CacheSlavePort::CacheSlavePort(const std::string &_name,
BaseCache *_cache,
const std::string &_label)
- : QueuedSlavePort(_name, _cache, queue), queue(*_cache, *this, _label),
+ : QueuedSlavePort(_name, _cache, queue),
+ queue(*_cache, *this, true, _label),
blocked(false), mustSendRetry(false),
sendRetryEvent([this]{ processSendRetry(); }, _name)
{
// lat, neglecting responseLatency, modelling hit latency
// just as the value of lat overriden by access(), which calls
// the calculateAccessLatency() function.
- cpuSidePort.schedTimingResp(pkt, request_time, true);
+ cpuSidePort.schedTimingResp(pkt, request_time);
} else {
DPRINTF(Cache, "%s satisfied %s, no response needed\n", __func__,
pkt->print());
// Reset the bus additional time as it is now accounted for
pkt->headerDelay = pkt->payloadDelay = 0;
- cpuSidePort.schedTimingResp(pkt, completion_time, true);
+ cpuSidePort.schedTimingResp(pkt, completion_time);
}
void
const std::string &_label)
: CacheMasterPort(_name, _cache, _reqQueue, _snoopRespQueue),
_reqQueue(*_cache, *this, _snoopRespQueue, _label),
- _snoopRespQueue(*_cache, *this, _label), cache(_cache)
+ _snoopRespQueue(*_cache, *this, true, _label), cache(_cache)
{
}
// request_time is used here, taking into account lat and the delay
// charged if the packet comes from the xbar.
- cpuSidePort.schedTimingResp(pkt, request_time, true);
+ cpuSidePort.schedTimingResp(pkt, request_time);
// If an outstanding request is in progress (we found an
// MSHR) this is set to null
}
// Reset the bus additional time as it is now accounted for
tgt_pkt->headerDelay = tgt_pkt->payloadDelay = 0;
- cpuSidePort.schedTimingResp(tgt_pkt, completion_time, true);
+ cpuSidePort.schedTimingResp(tgt_pkt, completion_time);
break;
case MSHR::Target::FromPrefetcher:
pkt->headerDelay = pkt->payloadDelay = 0;
DPRINTF(CacheVerbose, "%s: created response: %s tick: %lu\n", __func__,
pkt->print(), forward_time);
- memSidePort.schedTimingSnoopResp(pkt, forward_time, true);
+ memSidePort.schedTimingSnoopResp(pkt, forward_time);
}
uint32_t
// Reset the bus additional time as it is now accounted for
tgt_pkt->headerDelay = tgt_pkt->payloadDelay = 0;
- cpuSidePort.schedTimingResp(tgt_pkt, completion_time, true);
+ cpuSidePort.schedTimingResp(tgt_pkt, completion_time);
break;
case MSHR::Target::FromPrefetcher:
// queue the packet in the response queue to be sent out after
// the static latency has passed
- port.schedTimingResp(pkt, response_time, true);
+ port.schedTimingResp(pkt, response_time);
} else {
// @todo the packet is going to be deleted, and the DRAMPacket
// is still having a pointer to it
}
DRAMCtrl::MemoryPort::MemoryPort(const std::string& name, DRAMCtrl& _memory)
- : QueuedSlavePort(name, &_memory, queue), queue(_memory, *this),
+ : QueuedSlavePort(name, &_memory, queue), queue(_memory, *this, true),
memory(_memory)
{ }
/*
- * Copyright (c) 2012,2015 ARM Limited
+ * Copyright (c) 2012,2015,2018 ARM Limited
* All rights reserved.
*
* The license below extends only to copyright in the software and shall
PacketQueue::PacketQueue(EventManager& _em, const std::string& _label,
const std::string& _sendEventName,
+ bool force_order,
bool disable_sanity_check)
: em(_em), sendEvent([this]{ processSendEvent(); }, _sendEventName),
_disableSanityCheck(disable_sanity_check),
+ forceOrder(force_order),
label(_label), waitingOnRetry(false)
{
}
}
void
-PacketQueue::schedSendTiming(PacketPtr pkt, Tick when, bool force_order)
+PacketQueue::schedSendTiming(PacketPtr pkt, Tick when)
{
DPRINTF(PacketQueue, "%s for %s address %x size %d when %lu ord: %i\n",
__func__, pkt->cmdString(), pkt->getAddr(), pkt->getSize(), when,
- force_order);
+ forceOrder);
// we can still send a packet before the end of this tick
assert(when >= curTick());
// assert(waitingOnRetry || sendEvent.scheduled());
// this belongs in the middle somewhere, so search from the end to
- // order by tick; however, if force_order is set, also make sure
+ // order by tick; however, if forceOrder is set, also make sure
// not to re-order in front of some existing packet with the same
// address
auto i = transmitList.end();
--i;
while (i != transmitList.begin() && when < i->tick &&
- !(force_order && i->pkt->getAddr() == pkt->getAddr()))
+ !(forceOrder && i->pkt->getAddr() == pkt->getAddr()))
--i;
// emplace inserts the element before the position pointed to by
SnoopRespPacketQueue::SnoopRespPacketQueue(EventManager& _em,
MasterPort& _masterPort,
+ bool force_order,
const std::string _label)
- : PacketQueue(_em, _label, name(_masterPort, _label)),
+ : PacketQueue(_em, _label, name(_masterPort, _label), force_order),
masterPort(_masterPort)
{
}
}
RespPacketQueue::RespPacketQueue(EventManager& _em, SlavePort& _slavePort,
+ bool force_order,
const std::string _label)
- : PacketQueue(_em, _label, name(_slavePort, _label)),
+ : PacketQueue(_em, _label, name(_slavePort, _label), force_order),
slavePort(_slavePort)
{
}
/*
- * Copyright (c) 2012,2015 ARM Limited
+ * Copyright (c) 2012,2015,2018 ARM Limited
* All rights reserved.
*
* The license below extends only to copyright in the software and shall
*/
bool _disableSanityCheck;
+ /**
+ * if true, inserted packets have to be unconditionally scheduled
+ * after the last packet in the queue that references the same
+ * address
+ */
+ bool forceOrder;
+
protected:
/** Label to use for print request packets label stack. */
*
* @param _em Event manager used for scheduling this queue
* @param _label Label to push on the label stack for print request packets
+ * @param force_order Force insertion order for packets with same address
* @param disable_sanity_check Flag used to disable the sanity check
* on the size of the transmitList. The check is enabled by default.
*/
PacketQueue(EventManager& _em, const std::string& _label,
const std::string& _sendEventName,
+ bool force_order = false,
bool disable_sanity_check = false);
/**
*
* @param pkt Packet to send
* @param when Absolute time (in ticks) to send packet
- * @param force_order Force insertion order for packets with same address
*/
- void schedSendTiming(PacketPtr pkt, Tick when, bool force_order = false);
+ void schedSendTiming(PacketPtr pkt, Tick when);
/**
* Retry sending a packet from the queue. Note that this is not
*
* @param _em Event manager used for scheduling this queue
* @param _masterPort Master port used to send the packets
+ * @param force_order Force insertion order for packets with same address
* @param _label Label to push on the label stack for print request packets
*/
SnoopRespPacketQueue(EventManager& _em, MasterPort& _masterPort,
+ bool force_order = false,
const std::string _label = "SnoopRespPacketQueue");
virtual ~SnoopRespPacketQueue() { }
*
* @param _em Event manager used for scheduling this queue
* @param _slavePort Slave port used to send the packets
+ * @param force_order Force insertion order for packets with same address
* @param _label Label to push on the label stack for print request packets
*/
RespPacketQueue(EventManager& _em, SlavePort& _slavePort,
- const std::string _label = "RespPacketQueue");
+ bool force_order = false,
+ const std::string _label = "RespPacketQueue");
virtual ~RespPacketQueue() { }
removed_entries, responseLatency);
// Schedule the response
- port.schedTimingResp(pkt, curTick() + responseLatency, true);
+ port.schedTimingResp(pkt, curTick() + responseLatency);
DPRINTF(QOS,
"%s response scheduled at time %d\n",
__func__, curTick() + responseLatency);
MemSinkCtrl::MemoryPort::MemoryPort(const std::string& n,
MemSinkCtrl& m)
- : QueuedSlavePort(n, &m, queue), memory(m), queue(memory, *this)
+ : QueuedSlavePort(n, &m, queue, true), memory(m), queue(memory, *this, true)
{}
AddrRangeList
* @param pkt Packet to send
* @param when Absolute time (in ticks) to send packet
*/
- void schedTimingResp(PacketPtr pkt, Tick when, bool force_order = false)
- { respQueue.schedSendTiming(pkt, when, force_order); }
+ void schedTimingResp(PacketPtr pkt, Tick when)
+ { respQueue.schedSendTiming(pkt, when); }
/** Check the list of buffered packets against the supplied
* functional request. */
* @param pkt Packet to send
* @param when Absolute time (in ticks) to send packet
*/
- void schedTimingSnoopResp(PacketPtr pkt, Tick when, bool force_order =
- false)
- { snoopRespQueue.schedSendTiming(pkt, when, force_order); }
+ void schedTimingSnoopResp(PacketPtr pkt, Tick when)
+ { snoopRespQueue.schedSendTiming(pkt, when); }
/** Check the list of buffered packets against the supplied
* functional request. */
const std::string &_label)
: QueuedMasterPort(_name, _controller, reqQueue, snoopRespQueue),
reqQueue(*_controller, *this, _label),
- snoopRespQueue(*_controller, *this, _label),
+ snoopRespQueue(*_controller, *this, false, _label),
controller(_controller)
{
}