xbar.cc (12776:410b60d8a397) | xbar.cc (12778:ca8c50112a66) |
---|---|
1/* 2 * Copyright (c) 2011-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 --- 313 unchanged lines hidden (view full) --- 322 323PortID 324BaseXBar::findPort(Addr addr) 325{ 326 // we should never see any address lookups before we've got the 327 // ranges of all connected slave modules 328 assert(gotAllAddrRanges); 329 | 1/* 2 * Copyright (c) 2011-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 --- 313 unchanged lines hidden (view full) --- 322 323PortID 324BaseXBar::findPort(Addr addr) 325{ 326 // we should never see any address lookups before we've got the 327 // ranges of all connected slave modules 328 assert(gotAllAddrRanges); 329 |
330 // Check the cache 331 PortID dest_id = checkPortCache(addr); 332 if (dest_id != InvalidPortID) 333 return dest_id; 334 | |
335 // Check the address map interval tree 336 auto i = portMap.contains(addr); 337 if (i != portMap.end()) { | 330 // Check the address map interval tree 331 auto i = portMap.contains(addr); 332 if (i != portMap.end()) { |
338 dest_id = i->second; 339 updatePortCache(dest_id, i->first); 340 return dest_id; | 333 return i->second; |
341 } 342 343 // Check if this matches the default range 344 if (useDefaultRange) { 345 if (defaultRange.contains(addr)) { 346 DPRINTF(AddrRanges, " found addr %#llx on default\n", 347 addr); 348 return defaultPortID; --- 164 unchanged lines hidden (view full) --- 513 } 514 } 515 516 // tell all our neighbouring master ports that our address 517 // ranges have changed 518 for (const auto& s: slavePorts) 519 s->sendRangeChange(); 520 } | 334 } 335 336 // Check if this matches the default range 337 if (useDefaultRange) { 338 if (defaultRange.contains(addr)) { 339 DPRINTF(AddrRanges, " found addr %#llx on default\n", 340 addr); 341 return defaultPortID; --- 164 unchanged lines hidden (view full) --- 506 } 507 } 508 509 // tell all our neighbouring master ports that our address 510 // ranges have changed 511 for (const auto& s: slavePorts) 512 s->sendRangeChange(); 513 } |
521 522 clearPortCache(); | |
523} 524 525AddrRangeList 526BaseXBar::getAddrRanges() const 527{ 528 // we should never be asked without first having sent a range 529 // change, and the latter is only done once we have all the ranges 530 // of the connected devices --- 102 unchanged lines hidden --- | 514} 515 516AddrRangeList 517BaseXBar::getAddrRanges() const 518{ 519 // we should never be asked without first having sent a range 520 // change, and the latter is only done once we have all the ranges 521 // of the connected devices --- 102 unchanged lines hidden --- |