packet_queue.cc (13565:fe1169a7502d) packet_queue.cc (13860:8f8df5b68439)
1/*
2 * Copyright (c) 2012,2015,2018 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 58 unchanged lines hidden (view full) ---

67{
68 DPRINTF(PacketQueue, "Queue %s received retry\n", name());
69 assert(waitingOnRetry);
70 waitingOnRetry = false;
71 sendDeferredPacket();
72}
73
74bool
1/*
2 * Copyright (c) 2012,2015,2018 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 58 unchanged lines hidden (view full) ---

67{
68 DPRINTF(PacketQueue, "Queue %s received retry\n", name());
69 assert(waitingOnRetry);
70 waitingOnRetry = false;
71 sendDeferredPacket();
72}
73
74bool
75PacketQueue::hasAddr(Addr addr) const
75PacketQueue::checkConflict(const PacketPtr pkt, const int blk_size) const
76{
77 // caller is responsible for ensuring that all packets have the
78 // same alignment
79 for (const auto& p : transmitList) {
76{
77 // caller is responsible for ensuring that all packets have the
78 // same alignment
79 for (const auto& p : transmitList) {
80 if (p.pkt->getAddr() == addr)
80 if (p.pkt->matchBlockAddr(pkt, blk_size))
81 return true;
82 }
83 return false;
84}
85
86bool
87PacketQueue::trySatisfyFunctional(PacketPtr pkt)
88{

--- 44 unchanged lines hidden (view full) ---

133
134 // this belongs in the middle somewhere, so search from the end to
135 // order by tick; however, if forceOrder is set, also make sure
136 // not to re-order in front of some existing packet with the same
137 // address
138 auto it = transmitList.end();
139 while (it != transmitList.begin()) {
140 --it;
81 return true;
82 }
83 return false;
84}
85
86bool
87PacketQueue::trySatisfyFunctional(PacketPtr pkt)
88{

--- 44 unchanged lines hidden (view full) ---

133
134 // this belongs in the middle somewhere, so search from the end to
135 // order by tick; however, if forceOrder is set, also make sure
136 // not to re-order in front of some existing packet with the same
137 // address
138 auto it = transmitList.end();
139 while (it != transmitList.begin()) {
140 --it;
141 if ((forceOrder && it->pkt->getAddr() == pkt->getAddr()) ||
142 it->tick <= when) {
141 if ((forceOrder && it->pkt->matchAddr(pkt)) || it->tick <= when) {
143 // emplace inserts the element before the position pointed to by
144 // the iterator, so advance it one step
145 transmitList.emplace(++it, when, pkt);
146 return;
147 }
148 }
149 // either the packet list is empty or this has to be inserted
150 // before every other packet

--- 129 unchanged lines hidden ---
142 // emplace inserts the element before the position pointed to by
143 // the iterator, so advance it one step
144 transmitList.emplace(++it, when, pkt);
145 return;
146 }
147 }
148 // either the packet list is empty or this has to be inserted
149 // before every other packet

--- 129 unchanged lines hidden ---