1/* 2 * Copyright (c) 2011-2012 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 --- 123 unchanged lines hidden (view full) --- 132 133bool 134Bridge::BridgeMasterPort::reqQueueFull() 135{ 136 return requestQueue.size() == reqQueueLimit; 137} 138 139bool |
140Bridge::BridgeMasterPort::recvTimingResp(PacketPtr pkt) |
141{ |
142 // all checks are done when the request is accepted on the slave 143 // side, so we are guaranteed to have space for the response 144 DPRINTF(BusBridge, "recvTiming: response %s addr 0x%x\n", 145 pkt->cmdString(), pkt->getAddr()); 146 147 DPRINTF(BusBridge, "Request queue size: %d\n", requestQueue.size()); 148 149 slavePort.queueForSendTiming(pkt); 150 151 return true; 152} 153 154bool |
155Bridge::BridgeSlavePort::recvTimingReq(PacketPtr pkt) |
156{ |
157 DPRINTF(BusBridge, "recvTiming: request %s addr 0x%x\n", 158 pkt->cmdString(), pkt->getAddr()); 159 160 DPRINTF(BusBridge, "Response queue size: %d outresp: %d\n", 161 responseQueue.size(), outstandingResponses); 162 163 if (masterPort.reqQueueFull()) { 164 DPRINTF(BusBridge, "Request queue full, nacking\n"); --- 141 unchanged lines hidden (view full) --- 306 // If the send was successful, make sure sender state was set to NULL 307 // otherwise we could get a NACK back of a packet that didn't expect a 308 // response and we would try to use freed memory. 309 310 Packet::SenderState *old_sender_state = pkt->senderState; 311 if (!buf->expectResponse) 312 pkt->senderState = NULL; 313 |
314 if (sendTimingReq(pkt)) { |
315 // send successful 316 requestQueue.pop_front(); 317 // we no longer own packet, so it's not safe to look at it 318 buf->pkt = NULL; 319 320 if (!buf->expectResponse) { 321 // no response expected... deallocate packet buffer now. 322 DPRINTF(BusBridge, " successful: no response expected\n"); --- 30 unchanged lines hidden (view full) --- 353 DPRINTF(BusBridge, "trySend: origSrc %d dest %d addr 0x%x\n", 354 buf->origSrc, pkt->getDest(), pkt->getAddr()); 355 356 bool was_nacked_here = buf->nackedHere; 357 358 // no need to worry about the sender state since we are not 359 // modifying it 360 |
361 if (sendTimingResp(pkt)) { |
362 DPRINTF(BusBridge, " successful\n"); 363 // send successful 364 responseQueue.pop_front(); 365 // this is a response... deallocate packet buffer now. 366 delete buf; 367 368 if (!was_nacked_here) { 369 assert(outstandingResponses != 0); --- 100 unchanged lines hidden --- |