coherent_xbar.cc (10405:7a618c07e663) | coherent_xbar.cc (10572:fc4c90a7d2f5) |
---|---|
1/* 2 * Copyright (c) 2011-2014 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 --- 258 unchanged lines hidden (view full) --- 267bool 268CoherentXBar::recvTimingResp(PacketPtr pkt, PortID master_port_id) 269{ 270 // determine the source port based on the id 271 MasterPort *src_port = masterPorts[master_port_id]; 272 273 // determine the destination based on what is stored in the packet 274 PortID slave_port_id = pkt->getDest(); | 1/* 2 * Copyright (c) 2011-2014 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 --- 258 unchanged lines hidden (view full) --- 267bool 268CoherentXBar::recvTimingResp(PacketPtr pkt, PortID master_port_id) 269{ 270 // determine the source port based on the id 271 MasterPort *src_port = masterPorts[master_port_id]; 272 273 // determine the destination based on what is stored in the packet 274 PortID slave_port_id = pkt->getDest(); |
275 assert(slave_port_id != InvalidPortID); 276 assert(slave_port_id < respLayers.size()); |
|
275 276 // test if the crossbar should be considered occupied for the 277 // current port 278 if (!respLayers[slave_port_id]->tryTiming(src_port)) { 279 DPRINTF(CoherentXBar, "recvTimingResp: src %s %s 0x%x BUSY\n", 280 src_port->name(), pkt->cmdString(), pkt->getAddr()); 281 return false; 282 } --- 81 unchanged lines hidden (view full) --- 364bool 365CoherentXBar::recvTimingSnoopResp(PacketPtr pkt, PortID slave_port_id) 366{ 367 // determine the source port based on the id 368 SlavePort* src_port = slavePorts[slave_port_id]; 369 370 // get the destination from the packet 371 PortID dest_port_id = pkt->getDest(); | 277 278 // test if the crossbar should be considered occupied for the 279 // current port 280 if (!respLayers[slave_port_id]->tryTiming(src_port)) { 281 DPRINTF(CoherentXBar, "recvTimingResp: src %s %s 0x%x BUSY\n", 282 src_port->name(), pkt->cmdString(), pkt->getAddr()); 283 return false; 284 } --- 81 unchanged lines hidden (view full) --- 366bool 367CoherentXBar::recvTimingSnoopResp(PacketPtr pkt, PortID slave_port_id) 368{ 369 // determine the source port based on the id 370 SlavePort* src_port = slavePorts[slave_port_id]; 371 372 // get the destination from the packet 373 PortID dest_port_id = pkt->getDest(); |
374 assert(dest_port_id != InvalidPortID); |
|
372 373 // determine if the response is from a snoop request we 374 // created as the result of a normal request (in which case it 375 // should be in the outstandingReq), or if we merely forwarded 376 // someone else's snoop request 377 bool forwardAsSnoop = outstandingReq.find(pkt->req) == 378 outstandingReq.end(); 379 380 // test if the crossbar should be considered occupied for the 381 // current port, note that the check is bypassed if the response 382 // is being passed on as a normal response since this is occupying 383 // the response layer rather than the snoop response layer 384 if (forwardAsSnoop) { | 375 376 // determine if the response is from a snoop request we 377 // created as the result of a normal request (in which case it 378 // should be in the outstandingReq), or if we merely forwarded 379 // someone else's snoop request 380 bool forwardAsSnoop = outstandingReq.find(pkt->req) == 381 outstandingReq.end(); 382 383 // test if the crossbar should be considered occupied for the 384 // current port, note that the check is bypassed if the response 385 // is being passed on as a normal response since this is occupying 386 // the response layer rather than the snoop response layer 387 if (forwardAsSnoop) { |
388 assert(dest_port_id < snoopLayers.size()); |
|
385 if (!snoopLayers[dest_port_id]->tryTiming(src_port)) { 386 DPRINTF(CoherentXBar, "recvTimingSnoopResp: src %s %s 0x%x BUSY\n", 387 src_port->name(), pkt->cmdString(), pkt->getAddr()); 388 return false; 389 } 390 } else { 391 // get the master port that mirrors this slave port internally 392 MasterPort* snoop_port = snoopRespPorts[slave_port_id]; | 389 if (!snoopLayers[dest_port_id]->tryTiming(src_port)) { 390 DPRINTF(CoherentXBar, "recvTimingSnoopResp: src %s %s 0x%x BUSY\n", 391 src_port->name(), pkt->cmdString(), pkt->getAddr()); 392 return false; 393 } 394 } else { 395 // get the master port that mirrors this slave port internally 396 MasterPort* snoop_port = snoopRespPorts[slave_port_id]; |
397 assert(dest_port_id < respLayers.size()); |
|
393 if (!respLayers[dest_port_id]->tryTiming(snoop_port)) { 394 DPRINTF(CoherentXBar, "recvTimingSnoopResp: src %s %s 0x%x BUSY\n", 395 snoop_port->name(), pkt->cmdString(), pkt->getAddr()); 396 return false; 397 } 398 } 399 400 DPRINTF(CoherentXBar, "recvTimingSnoopResp: src %s %s 0x%x\n", --- 413 unchanged lines hidden --- | 398 if (!respLayers[dest_port_id]->tryTiming(snoop_port)) { 399 DPRINTF(CoherentXBar, "recvTimingSnoopResp: src %s %s 0x%x BUSY\n", 400 snoop_port->name(), pkt->cmdString(), pkt->getAddr()); 401 return false; 402 } 403 } 404 405 DPRINTF(CoherentXBar, "recvTimingSnoopResp: src %s %s 0x%x\n", --- 413 unchanged lines hidden --- |