xbar.cc (12778:ca8c50112a66) xbar.cc (12780:14937f6495b4)
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

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

316 if (state == IDLE) {
317 retryWaiting();
318 } else {
319 assert(state == BUSY);
320 }
321}
322
323PortID
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

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

316 if (state == IDLE) {
317 retryWaiting();
318 } else {
319 assert(state == BUSY);
320 }
321}
322
323PortID
324BaseXBar::findPort(Addr addr)
324BaseXBar::findPort(AddrRange addr_range)
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 address map interval tree
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 address map interval tree
331 auto i = portMap.contains(addr);
331 auto i = portMap.contains(addr_range);
332 if (i != portMap.end()) {
333 return i->second;
334 }
335
336 // Check if this matches the default range
337 if (useDefaultRange) {
332 if (i != portMap.end()) {
333 return i->second;
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);
338 if (addr_range.isSubset(defaultRange)) {
339 DPRINTF(AddrRanges, " found addr %s on default\n",
340 addr_range.to_string());
341 return defaultPortID;
342 }
343 } else if (defaultPortID != InvalidPortID) {
341 return defaultPortID;
342 }
343 } else if (defaultPortID != InvalidPortID) {
344 DPRINTF(AddrRanges, "Unable to find destination for addr %#llx, "
345 "will use default port\n", addr);
344 DPRINTF(AddrRanges, "Unable to find destination for %s, "
345 "will use default port\n", addr_range.to_string());
346 return defaultPortID;
347 }
348
349 // we should use the range for the default port and it did not
350 // match, or the default port is not set
346 return defaultPortID;
347 }
348
349 // we should use the range for the default port and it did not
350 // match, or the default port is not set
351 fatal("Unable to find destination for addr %#llx on %s\n", addr,
351 fatal("Unable to find destination for %s on %s\n", addr_range.to_string(),
352 name());
353}
354
355/** Function called by the port when the crossbar is receiving a range change.*/
356void
357BaseXBar::recvRangeChange(PortID master_port_id)
358{
359 DPRINTF(AddrRanges, "Received range change from slave port %s\n",

--- 264 unchanged lines hidden ---
352 name());
353}
354
355/** Function called by the port when the crossbar is receiving a range change.*/
356void
357BaseXBar::recvRangeChange(PortID master_port_id)
358{
359 DPRINTF(AddrRanges, "Received range change from slave port %s\n",

--- 264 unchanged lines hidden ---