noncoherent_xbar.cc (12778:ca8c50112a66) | noncoherent_xbar.cc (12780:14937f6495b4) |
---|---|
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 --- 92 unchanged lines hidden (view full) --- 103{ 104 // determine the source port based on the id 105 SlavePort *src_port = slavePorts[slave_port_id]; 106 107 // we should never see express snoops on a non-coherent crossbar 108 assert(!pkt->isExpressSnoop()); 109 110 // determine the destination based on the address | 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 --- 92 unchanged lines hidden (view full) --- 103{ 104 // determine the source port based on the id 105 SlavePort *src_port = slavePorts[slave_port_id]; 106 107 // we should never see express snoops on a non-coherent crossbar 108 assert(!pkt->isExpressSnoop()); 109 110 // determine the destination based on the address |
111 PortID master_port_id = findPort(pkt->getAddr()); | 111 AddrRange addr_range = RangeSize(pkt->getAddr(), pkt->getSize()); 112 PortID master_port_id = findPort(addr_range); |
112 113 // test if the layer should be considered occupied for the current 114 // port 115 if (!reqLayers[master_port_id]->tryTiming(src_port)) { 116 DPRINTF(NoncoherentXBar, "recvTimingReq: src %s %s 0x%x BUSY\n", 117 src_port->name(), pkt->cmdString(), pkt->getAddr()); 118 return false; 119 } --- 128 unchanged lines hidden (view full) --- 248 DPRINTF(NoncoherentXBar, "recvAtomic: packet src %s addr 0x%x cmd %s\n", 249 slavePorts[slave_port_id]->name(), pkt->getAddr(), 250 pkt->cmdString()); 251 252 unsigned int pkt_size = pkt->hasData() ? pkt->getSize() : 0; 253 unsigned int pkt_cmd = pkt->cmdToIndex(); 254 255 // determine the destination port | 113 114 // test if the layer should be considered occupied for the current 115 // port 116 if (!reqLayers[master_port_id]->tryTiming(src_port)) { 117 DPRINTF(NoncoherentXBar, "recvTimingReq: src %s %s 0x%x BUSY\n", 118 src_port->name(), pkt->cmdString(), pkt->getAddr()); 119 return false; 120 } --- 128 unchanged lines hidden (view full) --- 249 DPRINTF(NoncoherentXBar, "recvAtomic: packet src %s addr 0x%x cmd %s\n", 250 slavePorts[slave_port_id]->name(), pkt->getAddr(), 251 pkt->cmdString()); 252 253 unsigned int pkt_size = pkt->hasData() ? pkt->getSize() : 0; 254 unsigned int pkt_cmd = pkt->cmdToIndex(); 255 256 // determine the destination port |
256 PortID master_port_id = findPort(pkt->getAddr()); | 257 AddrRange addr_range = RangeSize(pkt->getAddr(), pkt->getSize()); 258 PortID master_port_id = findPort(addr_range); |
257 258 // stats updates for the request 259 pktCount[slave_port_id][master_port_id]++; 260 pktSize[slave_port_id][master_port_id] += pkt_size; 261 transDist[pkt_cmd]++; 262 263 // forward the request to the appropriate destination 264 Tick response_latency = masterPorts[master_port_id]->sendAtomic(pkt); --- 33 unchanged lines hidden (view full) --- 298 if (p->checkFunctional(pkt)) { 299 if (pkt->needsResponse()) 300 pkt->makeResponse(); 301 return; 302 } 303 } 304 305 // determine the destination port | 259 260 // stats updates for the request 261 pktCount[slave_port_id][master_port_id]++; 262 pktSize[slave_port_id][master_port_id] += pkt_size; 263 transDist[pkt_cmd]++; 264 265 // forward the request to the appropriate destination 266 Tick response_latency = masterPorts[master_port_id]->sendAtomic(pkt); --- 33 unchanged lines hidden (view full) --- 300 if (p->checkFunctional(pkt)) { 301 if (pkt->needsResponse()) 302 pkt->makeResponse(); 303 return; 304 } 305 } 306 307 // determine the destination port |
306 PortID dest_id = findPort(pkt->getAddr()); | 308 AddrRange addr_range = RangeSize(pkt->getAddr(), pkt->getSize()); 309 PortID dest_id = findPort(addr_range); |
307 308 // forward the request to the appropriate destination 309 masterPorts[dest_id]->sendFunctional(pkt); 310} 311 312NoncoherentXBar* 313NoncoherentXBarParams::create() 314{ --- 13 unchanged lines hidden --- | 310 311 // forward the request to the appropriate destination 312 masterPorts[dest_id]->sendFunctional(pkt); 313} 314 315NoncoherentXBar* 316NoncoherentXBarParams::create() 317{ --- 13 unchanged lines hidden --- |