noncoherent_xbar.cc (10656:bd376adfb7d4) | noncoherent_xbar.cc (10694:1a6785e37d81) |
---|---|
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 --- 114 unchanged lines hidden (view full) --- 123 src_port->name(), pkt->cmdString(), pkt->getAddr()); 124 125 // store size and command as they might be modified when 126 // forwarding the packet 127 unsigned int pkt_size = pkt->hasData() ? pkt->getSize() : 0; 128 unsigned int pkt_cmd = pkt->cmdToIndex(); 129 130 calcPacketTiming(pkt); | 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 --- 114 unchanged lines hidden (view full) --- 123 src_port->name(), pkt->cmdString(), pkt->getAddr()); 124 125 // store size and command as they might be modified when 126 // forwarding the packet 127 unsigned int pkt_size = pkt->hasData() ? pkt->getSize() : 0; 128 unsigned int pkt_cmd = pkt->cmdToIndex(); 129 130 calcPacketTiming(pkt); |
131 Tick packetFinishTime = pkt->lastWordDelay + curTick(); | 131 Tick packetFinishTime = curTick() + pkt->payloadDelay; |
132 133 // before forwarding the packet (and possibly altering it), 134 // remember if we are expecting a response 135 const bool expect_response = pkt->needsResponse() && 136 !pkt->memInhibitAsserted(); 137 138 // since it is a normal request, attempt to send the packet 139 bool success = masterPorts[master_port_id]->sendTimingReq(pkt); 140 141 if (!success) { 142 // inhibited packets should never be forced to retry 143 assert(!pkt->memInhibitAsserted()); 144 145 DPRINTF(NoncoherentXBar, "recvTimingReq: src %s %s 0x%x RETRY\n", 146 src_port->name(), pkt->cmdString(), pkt->getAddr()); 147 148 // undo the calculation so we can check for 0 again | 132 133 // before forwarding the packet (and possibly altering it), 134 // remember if we are expecting a response 135 const bool expect_response = pkt->needsResponse() && 136 !pkt->memInhibitAsserted(); 137 138 // since it is a normal request, attempt to send the packet 139 bool success = masterPorts[master_port_id]->sendTimingReq(pkt); 140 141 if (!success) { 142 // inhibited packets should never be forced to retry 143 assert(!pkt->memInhibitAsserted()); 144 145 DPRINTF(NoncoherentXBar, "recvTimingReq: src %s %s 0x%x RETRY\n", 146 src_port->name(), pkt->cmdString(), pkt->getAddr()); 147 148 // undo the calculation so we can check for 0 again |
149 pkt->firstWordDelay = pkt->lastWordDelay = 0; | 149 pkt->headerDelay = pkt->payloadDelay = 0; |
150 151 // occupy until the header is sent 152 reqLayers[master_port_id]->failedTiming(src_port, 153 clockEdge(headerCycles)); 154 155 return false; 156 } 157 --- 38 unchanged lines hidden (view full) --- 196 src_port->name(), pkt->cmdString(), pkt->getAddr()); 197 198 // store size and command as they might be modified when 199 // forwarding the packet 200 unsigned int pkt_size = pkt->hasData() ? pkt->getSize() : 0; 201 unsigned int pkt_cmd = pkt->cmdToIndex(); 202 203 calcPacketTiming(pkt); | 150 151 // occupy until the header is sent 152 reqLayers[master_port_id]->failedTiming(src_port, 153 clockEdge(headerCycles)); 154 155 return false; 156 } 157 --- 38 unchanged lines hidden (view full) --- 196 src_port->name(), pkt->cmdString(), pkt->getAddr()); 197 198 // store size and command as they might be modified when 199 // forwarding the packet 200 unsigned int pkt_size = pkt->hasData() ? pkt->getSize() : 0; 201 unsigned int pkt_cmd = pkt->cmdToIndex(); 202 203 calcPacketTiming(pkt); |
204 Tick packetFinishTime = pkt->lastWordDelay + curTick(); | 204 Tick packetFinishTime = curTick() + pkt->payloadDelay; |
205 206 // send the packet through the destination slave port 207 bool success M5_VAR_USED = slavePorts[slave_port_id]->sendTimingResp(pkt); 208 209 // currently it is illegal to block responses... can lead to 210 // deadlock 211 assert(success); 212 --- 47 unchanged lines hidden (view full) --- 260 261 // stats updates 262 pktCount[slave_port_id][master_port_id]++; 263 pktSize[slave_port_id][master_port_id] += pkt_size; 264 transDist[pkt_cmd]++; 265 } 266 267 // @todo: Not setting first-word time | 205 206 // send the packet through the destination slave port 207 bool success M5_VAR_USED = slavePorts[slave_port_id]->sendTimingResp(pkt); 208 209 // currently it is illegal to block responses... can lead to 210 // deadlock 211 assert(success); 212 --- 47 unchanged lines hidden (view full) --- 260 261 // stats updates 262 pktCount[slave_port_id][master_port_id]++; 263 pktSize[slave_port_id][master_port_id] += pkt_size; 264 transDist[pkt_cmd]++; 265 } 266 267 // @todo: Not setting first-word time |
268 pkt->lastWordDelay = response_latency; | 268 pkt->payloadDelay = response_latency; |
269 return response_latency; 270} 271 272void 273NoncoherentXBar::recvFunctional(PacketPtr pkt, PortID slave_port_id) 274{ 275 if (!pkt->isPrint()) { 276 // don't do DPRINTFs on PrintReq as it clutters up the output --- 41 unchanged lines hidden --- | 269 return response_latency; 270} 271 272void 273NoncoherentXBar::recvFunctional(PacketPtr pkt, PortID slave_port_id) 274{ 275 if (!pkt->isPrint()) { 276 // don't do DPRINTFs on PrintReq as it clutters up the output --- 41 unchanged lines hidden --- |