serial_link.cc (11321:02e930db812d) | serial_link.cc (11551:d24ad08b22b0) |
---|---|
1/* 2 * Copyright (c) 2011-2013 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 --- 73 unchanged lines hidden (view full) --- 82} 83 84SerialLink::SerialLink(SerialLinkParams *p) 85 : MemObject(p), 86 slavePort(p->name + ".slave", *this, masterPort, 87 ticksToCycles(p->delay), p->resp_size, p->ranges), 88 masterPort(p->name + ".master", *this, slavePort, 89 ticksToCycles(p->delay), p->req_size), | 1/* 2 * Copyright (c) 2011-2013 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 --- 73 unchanged lines hidden (view full) --- 82} 83 84SerialLink::SerialLink(SerialLinkParams *p) 85 : MemObject(p), 86 slavePort(p->name + ".slave", *this, masterPort, 87 ticksToCycles(p->delay), p->resp_size, p->ranges), 88 masterPort(p->name + ".master", *this, slavePort, 89 ticksToCycles(p->delay), p->req_size), |
90 num_lanes(p->num_lanes) | 90 num_lanes(p->num_lanes), 91 link_speed(p->link_speed) 92 |
91{ 92} 93 94BaseMasterPort& 95SerialLink::getMasterPort(const std::string &if_name, PortID idx) 96{ 97 if (if_name == "master") 98 return masterPort; --- 49 unchanged lines hidden (view full) --- 148 pkt->headerDelay = pkt->payloadDelay = 0; 149 150 // This is similar to what happens for the request packets: 151 // The serializer will start serialization as soon as it receives the 152 // first flit, but the deserializer (at the host side in this case), will 153 // have to wait to receive the whole packet. So we only account for the 154 // deserialization latency. 155 Cycles cycles = delay; | 93{ 94} 95 96BaseMasterPort& 97SerialLink::getMasterPort(const std::string &if_name, PortID idx) 98{ 99 if (if_name == "master") 100 return masterPort; --- 49 unchanged lines hidden (view full) --- 150 pkt->headerDelay = pkt->payloadDelay = 0; 151 152 // This is similar to what happens for the request packets: 153 // The serializer will start serialization as soon as it receives the 154 // first flit, but the deserializer (at the host side in this case), will 155 // have to wait to receive the whole packet. So we only account for the 156 // deserialization latency. 157 Cycles cycles = delay; |
156 cycles += Cycles(divCeil(pkt->getSize() * 8, serial_link.num_lanes)); 157 Tick t = serial_link.clockEdge(cycles); | 158 cycles += Cycles(divCeil(pkt->getSize() * 8, serial_link.num_lanes 159 * serial_link.link_speed)); 160 Tick t = serial_link.clockEdge(cycles); |
158 159 //@todo: If the processor sends two uncached requests towards HMC and the 160 // second one is smaller than the first one. It may happen that the second 161 // one crosses this link faster than the first one (because the packet 162 // waits in the link based on its size). This can reorder the received 163 // response. 164 slavePort.schedTimingResp(pkt, t); 165 --- 43 unchanged lines hidden (view full) --- 209 // does not need to receive the whole packet to start the 210 // serialization (this assumption is consistent with the HMC 211 // standard). But the deserializer waits for the complete packet 212 // to check its integrity first. So everytime a packet crosses a 213 // serial link, we should account for its deserialization latency 214 // only. 215 Cycles cycles = delay; 216 cycles += Cycles(divCeil(pkt->getSize() * 8, | 161 162 //@todo: If the processor sends two uncached requests towards HMC and the 163 // second one is smaller than the first one. It may happen that the second 164 // one crosses this link faster than the first one (because the packet 165 // waits in the link based on its size). This can reorder the received 166 // response. 167 slavePort.schedTimingResp(pkt, t); 168 --- 43 unchanged lines hidden (view full) --- 212 // does not need to receive the whole packet to start the 213 // serialization (this assumption is consistent with the HMC 214 // standard). But the deserializer waits for the complete packet 215 // to check its integrity first. So everytime a packet crosses a 216 // serial link, we should account for its deserialization latency 217 // only. 218 Cycles cycles = delay; 219 cycles += Cycles(divCeil(pkt->getSize() * 8, |
217 serial_link.num_lanes)); | 220 serial_link.num_lanes * serial_link.link_speed)); |
218 Tick t = serial_link.clockEdge(cycles); 219 220 //@todo: If the processor sends two uncached requests towards HMC 221 // and the second one is smaller than the first one. It may happen 222 // that the second one crosses this link faster than the first one 223 // (because the packet waits in the link based on its size). 224 // This can reorder the received response. 225 masterPort.schedTimingReq(pkt, t); --- 70 unchanged lines hidden (view full) --- 296 297 // If there are more packets to send, schedule event to try again. 298 if (!transmitList.empty()) { 299 DeferredPacket next_req = transmitList.front(); 300 DPRINTF(SerialLink, "Scheduling next send\n"); 301 302 // Make sure bandwidth limitation is met 303 Cycles cycles = Cycles(divCeil(pkt->getSize() * 8, | 221 Tick t = serial_link.clockEdge(cycles); 222 223 //@todo: If the processor sends two uncached requests towards HMC 224 // and the second one is smaller than the first one. It may happen 225 // that the second one crosses this link faster than the first one 226 // (because the packet waits in the link based on its size). 227 // This can reorder the received response. 228 masterPort.schedTimingReq(pkt, t); --- 70 unchanged lines hidden (view full) --- 299 300 // If there are more packets to send, schedule event to try again. 301 if (!transmitList.empty()) { 302 DeferredPacket next_req = transmitList.front(); 303 DPRINTF(SerialLink, "Scheduling next send\n"); 304 305 // Make sure bandwidth limitation is met 306 Cycles cycles = Cycles(divCeil(pkt->getSize() * 8, |
304 serial_link.num_lanes)); | 307 serial_link.num_lanes * serial_link.link_speed)); |
305 Tick t = serial_link.clockEdge(cycles); 306 serial_link.schedule(sendEvent, std::max(next_req.tick, t)); 307 } 308 309 // if we have stalled a request due to a full request queue, 310 // then send a retry at this point, also note that if the 311 // request we stalled was waiting for the response queue 312 // rather than the request queue we might stall it again --- 28 unchanged lines hidden (view full) --- 341 342 // If there are more packets to send, schedule event to try again. 343 if (!transmitList.empty()) { 344 DeferredPacket next_resp = transmitList.front(); 345 DPRINTF(SerialLink, "Scheduling next send\n"); 346 347 // Make sure bandwidth limitation is met 348 Cycles cycles = Cycles(divCeil(pkt->getSize() * 8, | 308 Tick t = serial_link.clockEdge(cycles); 309 serial_link.schedule(sendEvent, std::max(next_req.tick, t)); 310 } 311 312 // if we have stalled a request due to a full request queue, 313 // then send a retry at this point, also note that if the 314 // request we stalled was waiting for the response queue 315 // rather than the request queue we might stall it again --- 28 unchanged lines hidden (view full) --- 344 345 // If there are more packets to send, schedule event to try again. 346 if (!transmitList.empty()) { 347 DeferredPacket next_resp = transmitList.front(); 348 DPRINTF(SerialLink, "Scheduling next send\n"); 349 350 // Make sure bandwidth limitation is met 351 Cycles cycles = Cycles(divCeil(pkt->getSize() * 8, |
349 serial_link.num_lanes)); | 352 serial_link.num_lanes * serial_link.link_speed)); |
350 Tick t = serial_link.clockEdge(cycles); 351 serial_link.schedule(sendEvent, std::max(next_resp.tick, t)); 352 } 353 354 // if there is space in the request queue and we were stalling 355 // a request, it will definitely be possible to accept it now 356 // since there is guaranteed space in the response queue 357 if (!masterPort.reqQueueFull() && retryReq) { --- 80 unchanged lines hidden --- | 353 Tick t = serial_link.clockEdge(cycles); 354 serial_link.schedule(sendEvent, std::max(next_resp.tick, t)); 355 } 356 357 // if there is space in the request queue and we were stalling 358 // a request, it will definitely be possible to accept it now 359 // since there is guaranteed space in the response queue 360 if (!masterPort.reqQueueFull() && retryReq) { --- 80 unchanged lines hidden --- |