xbar.cc (12334:e0ab29a34764) | xbar.cc (12776:410b60d8a397) |
---|---|
1/* | 1/* |
2 * Copyright (c) 2011-2015 ARM Limited | 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 9 * licensed hereunder. You may use the software subject to the license 10 * terms below provided that you ensure that this notice is replicated --- 317 unchanged lines hidden (view full) --- 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 | 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 9 * licensed hereunder. You may use the software subject to the license 10 * terms below provided that you ensure that this notice is replicated --- 317 unchanged lines hidden (view full) --- 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.find(addr); | 336 auto i = portMap.contains(addr); |
337 if (i != portMap.end()) { 338 dest_id = i->second; 339 updatePortCache(dest_id, i->first); 340 return dest_id; 341 } 342 343 // Check if this matches the default range 344 if (useDefaultRange) { --- 70 unchanged lines hidden (view full) --- 415 } 416 417 AddrRangeList ranges = masterPorts[master_port_id]->getAddrRanges(); 418 419 for (const auto& r: ranges) { 420 DPRINTF(AddrRanges, "Adding range %s for id %d\n", 421 r.to_string(), master_port_id); 422 if (portMap.insert(r, master_port_id) == portMap.end()) { | 337 if (i != portMap.end()) { 338 dest_id = i->second; 339 updatePortCache(dest_id, i->first); 340 return dest_id; 341 } 342 343 // Check if this matches the default range 344 if (useDefaultRange) { --- 70 unchanged lines hidden (view full) --- 415 } 416 417 AddrRangeList ranges = masterPorts[master_port_id]->getAddrRanges(); 418 419 for (const auto& r: ranges) { 420 DPRINTF(AddrRanges, "Adding range %s for id %d\n", 421 r.to_string(), master_port_id); 422 if (portMap.insert(r, master_port_id) == portMap.end()) { |
423 PortID conflict_id = portMap.find(r)->second; 424 fatal("%s has two ports responding within range %s:\n\t%s\n\t%s\n", | 423 PortID conflict_id = portMap.intersects(r)->second; 424 fatal("%s has two ports responding within range " 425 "%s:\n\t%s\n\t%s\n", |
425 name(), 426 r.to_string(), 427 masterPorts[master_port_id]->getSlavePort().name(), 428 masterPorts[conflict_id]->getSlavePort().name()); 429 } 430 } 431 } 432 --- 58 unchanged lines hidden (view full) --- 491 AddrRange merged_range(intlv_ranges); 492 if (!(useDefaultRange && merged_range.isSubset(defaultRange))) { 493 xbarRanges.push_back(merged_range); 494 DPRINTF(AddrRanges, "-- Adding merged range %s\n", 495 merged_range.to_string()); 496 } 497 } 498 | 426 name(), 427 r.to_string(), 428 masterPorts[master_port_id]->getSlavePort().name(), 429 masterPorts[conflict_id]->getSlavePort().name()); 430 } 431 } 432 } 433 --- 58 unchanged lines hidden (view full) --- 492 AddrRange merged_range(intlv_ranges); 493 if (!(useDefaultRange && merged_range.isSubset(defaultRange))) { 494 xbarRanges.push_back(merged_range); 495 DPRINTF(AddrRanges, "-- Adding merged range %s\n", 496 merged_range.to_string()); 497 } 498 } 499 |
499 // also check that no range partially overlaps with the | 500 // also check that no range partially intersects with the |
500 // default range, this has to be done after all ranges are set 501 // as there are no guarantees for when the default range is 502 // update with respect to the other ones 503 if (useDefaultRange) { 504 for (const auto& r: xbarRanges) { 505 // see if the new range is partially 506 // overlapping the default range 507 if (r.intersects(defaultRange) && --- 124 unchanged lines hidden --- | 501 // default range, this has to be done after all ranges are set 502 // as there are no guarantees for when the default range is 503 // update with respect to the other ones 504 if (useDefaultRange) { 505 for (const auto& r: xbarRanges) { 506 // see if the new range is partially 507 // overlapping the default range 508 if (r.intersects(defaultRange) && --- 124 unchanged lines hidden --- |