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

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

388
389void
390SerialLink::SerialLinkSlavePort::recvFunctional(PacketPtr pkt)
391{
392 pkt->pushLabel(name());
393
394 // check the response queue
395 for (auto i = transmitList.begin(); i != transmitList.end(); ++i) {
1/*
2 * Copyright (c) 2011-2013 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

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

388
389void
390SerialLink::SerialLinkSlavePort::recvFunctional(PacketPtr pkt)
391{
392 pkt->pushLabel(name());
393
394 // check the response queue
395 for (auto i = transmitList.begin(); i != transmitList.end(); ++i) {
396 if (pkt->checkFunctional((*i).pkt)) {
396 if (pkt->trySatisfyFunctional((*i).pkt)) {
397 pkt->makeResponse();
398 return;
399 }
400 }
401
402 // also check the master port's request queue
397 pkt->makeResponse();
398 return;
399 }
400 }
401
402 // also check the master port's request queue
403 if (masterPort.checkFunctional(pkt)) {
403 if (masterPort.trySatisfyFunctional(pkt)) {
404 return;
405 }
406
407 pkt->popLabel();
408
409 // fall through if pkt still not satisfied
410 masterPort.sendFunctional(pkt);
411}
412
413bool
404 return;
405 }
406
407 pkt->popLabel();
408
409 // fall through if pkt still not satisfied
410 masterPort.sendFunctional(pkt);
411}
412
413bool
414SerialLink::SerialLinkMasterPort::checkFunctional(PacketPtr pkt)
414SerialLink::SerialLinkMasterPort::trySatisfyFunctional(PacketPtr pkt)
415{
416 bool found = false;
417 auto i = transmitList.begin();
418
419 while (i != transmitList.end() && !found) {
415{
416 bool found = false;
417 auto i = transmitList.begin();
418
419 while (i != transmitList.end() && !found) {
420 if (pkt->checkFunctional((*i).pkt)) {
420 if (pkt->trySatisfyFunctional((*i).pkt)) {
421 pkt->makeResponse();
422 found = true;
423 }
424 ++i;
425 }
426
427 return found;
428}

--- 12 unchanged lines hidden ---
421 pkt->makeResponse();
422 found = true;
423 }
424 ++i;
425 }
426
427 return found;
428}

--- 12 unchanged lines hidden ---