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), 91 link_speed(p->link_speed) 92 |
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; |
158 cycles += Cycles(divCeil(pkt->getSize() * 8, serial_link.num_lanes 159 * serial_link.link_speed)); 160 Tick t = serial_link.clockEdge(cycles); |
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, |
220 serial_link.num_lanes * serial_link.link_speed)); |
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, |
307 serial_link.num_lanes * serial_link.link_speed)); |
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, |
352 serial_link.num_lanes * serial_link.link_speed)); |
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 --- |