1/* |
2 * Copyright (c) 2011-2015 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 --- 111 unchanged lines hidden (view full) --- 122 DPRINTF(NoncoherentXBar, "recvTimingReq: src %s %s 0x%x\n", 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 // store the old header delay so we can restore it if needed 131 Tick old_header_delay = pkt->headerDelay; |
132 |
133 // a request sees the frontend and forward latency 134 Tick xbar_delay = (frontendLatency + forwardLatency) * clockPeriod(); 135 136 // set the packet header and payload delay 137 calcPacketTiming(pkt, xbar_delay); 138 139 // determine how long to be crossbar layer is busy 140 Tick packetFinishTime = clockEdge(Cycles(1)) + pkt->payloadDelay; 141 |
142 // before forwarding the packet (and possibly altering it), 143 // remember if we are expecting a response 144 const bool expect_response = pkt->needsResponse() && 145 !pkt->memInhibitAsserted(); 146 147 // since it is a normal request, attempt to send the packet 148 bool success = masterPorts[master_port_id]->sendTimingReq(pkt); 149 150 if (!success) { 151 // inhibited packets should never be forced to retry 152 assert(!pkt->memInhibitAsserted()); 153 154 DPRINTF(NoncoherentXBar, "recvTimingReq: src %s %s 0x%x RETRY\n", 155 src_port->name(), pkt->cmdString(), pkt->getAddr()); 156 |
157 // restore the header delay as it is additive 158 pkt->headerDelay = old_header_delay; |
159 160 // occupy until the header is sent 161 reqLayers[master_port_id]->failedTiming(src_port, |
162 clockEdge(Cycles(1))); |
163 164 return false; 165 } 166 167 // remember where to route the response to 168 if (expect_response) { 169 assert(routeTo.find(pkt->req) == routeTo.end()); 170 routeTo[pkt->req] = slave_port_id; --- 33 unchanged lines hidden (view full) --- 204 DPRINTF(NoncoherentXBar, "recvTimingResp: src %s %s 0x%x\n", 205 src_port->name(), pkt->cmdString(), pkt->getAddr()); 206 207 // store size and command as they might be modified when 208 // forwarding the packet 209 unsigned int pkt_size = pkt->hasData() ? pkt->getSize() : 0; 210 unsigned int pkt_cmd = pkt->cmdToIndex(); 211 |
212 // a response sees the response latency 213 Tick xbar_delay = responseLatency * clockPeriod(); |
214 |
215 // set the packet header and payload delay 216 calcPacketTiming(pkt, xbar_delay); 217 218 // determine how long to be crossbar layer is busy 219 Tick packetFinishTime = clockEdge(Cycles(1)) + pkt->payloadDelay; 220 |
221 // send the packet through the destination slave port 222 bool success M5_VAR_USED = slavePorts[slave_port_id]->sendTimingResp(pkt); 223 224 // currently it is illegal to block responses... can lead to 225 // deadlock 226 assert(success); 227 228 // remove the request from the routing table --- 104 unchanged lines hidden --- |