bridge.cc (12084:5a3769ff3d55) bridge.cc (12823:ba630bc7a36d)
1/*
2 * Copyright (c) 2011-2013, 2015 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

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

356
357void
358Bridge::BridgeSlavePort::recvFunctional(PacketPtr pkt)
359{
360 pkt->pushLabel(name());
361
362 // check the response queue
363 for (auto i = transmitList.begin(); i != transmitList.end(); ++i) {
1/*
2 * Copyright (c) 2011-2013, 2015 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

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

356
357void
358Bridge::BridgeSlavePort::recvFunctional(PacketPtr pkt)
359{
360 pkt->pushLabel(name());
361
362 // check the response queue
363 for (auto i = transmitList.begin(); i != transmitList.end(); ++i) {
364 if (pkt->checkFunctional((*i).pkt)) {
364 if (pkt->trySatisfyFunctional((*i).pkt)) {
365 pkt->makeResponse();
366 return;
367 }
368 }
369
370 // also check the master port's request queue
365 pkt->makeResponse();
366 return;
367 }
368 }
369
370 // also check the master port's request queue
371 if (masterPort.checkFunctional(pkt)) {
371 if (masterPort.trySatisfyFunctional(pkt)) {
372 return;
373 }
374
375 pkt->popLabel();
376
377 // fall through if pkt still not satisfied
378 masterPort.sendFunctional(pkt);
379}
380
381bool
372 return;
373 }
374
375 pkt->popLabel();
376
377 // fall through if pkt still not satisfied
378 masterPort.sendFunctional(pkt);
379}
380
381bool
382Bridge::BridgeMasterPort::checkFunctional(PacketPtr pkt)
382Bridge::BridgeMasterPort::trySatisfyFunctional(PacketPtr pkt)
383{
384 bool found = false;
385 auto i = transmitList.begin();
386
387 while (i != transmitList.end() && !found) {
383{
384 bool found = false;
385 auto i = transmitList.begin();
386
387 while (i != transmitList.end() && !found) {
388 if (pkt->checkFunctional((*i).pkt)) {
388 if (pkt->trySatisfyFunctional((*i).pkt)) {
389 pkt->makeResponse();
390 found = true;
391 }
392 ++i;
393 }
394
395 return found;
396}

--- 12 unchanged lines hidden ---
389 pkt->makeResponse();
390 found = true;
391 }
392 ++i;
393 }
394
395 return found;
396}

--- 12 unchanged lines hidden ---