Deleted Added
sdiff udiff text old ( 8949:3fa1ee293096 ) new ( 8975:7f36d4436074 )
full compact
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::recvTiming(PacketPtr pkt)
141{
142 // should only see responses on the master side
143 assert(pkt->isResponse());
144
145 // all checks are done when the request is accepted on the slave
146 // side, so we are guaranteed to have space for the response
147 DPRINTF(BusBridge, "recvTiming: response %s addr 0x%x\n",
148 pkt->cmdString(), pkt->getAddr());
149
150 DPRINTF(BusBridge, "Request queue size: %d\n", requestQueue.size());
151
152 slavePort.queueForSendTiming(pkt);
153
154 return true;
155}
156
157bool
158Bridge::BridgeSlavePort::recvTiming(PacketPtr pkt)
159{
160 // should only see requests on the slave side
161 assert(pkt->isRequest());
162
163
164 DPRINTF(BusBridge, "recvTiming: request %s addr 0x%x\n",
165 pkt->cmdString(), pkt->getAddr());
166
167 DPRINTF(BusBridge, "Response queue size: %d outresp: %d\n",
168 responseQueue.size(), outstandingResponses);
169
170 if (masterPort.reqQueueFull()) {
171 DPRINTF(BusBridge, "Request queue full, nacking\n");

--- 141 unchanged lines hidden (view full) ---

313 // If the send was successful, make sure sender state was set to NULL
314 // otherwise we could get a NACK back of a packet that didn't expect a
315 // response and we would try to use freed memory.
316
317 Packet::SenderState *old_sender_state = pkt->senderState;
318 if (!buf->expectResponse)
319 pkt->senderState = NULL;
320
321 if (sendTiming(pkt)) {
322 // send successful
323 requestQueue.pop_front();
324 // we no longer own packet, so it's not safe to look at it
325 buf->pkt = NULL;
326
327 if (!buf->expectResponse) {
328 // no response expected... deallocate packet buffer now.
329 DPRINTF(BusBridge, " successful: no response expected\n");

--- 30 unchanged lines hidden (view full) ---

360 DPRINTF(BusBridge, "trySend: origSrc %d dest %d addr 0x%x\n",
361 buf->origSrc, pkt->getDest(), pkt->getAddr());
362
363 bool was_nacked_here = buf->nackedHere;
364
365 // no need to worry about the sender state since we are not
366 // modifying it
367
368 if (sendTiming(pkt)) {
369 DPRINTF(BusBridge, " successful\n");
370 // send successful
371 responseQueue.pop_front();
372 // this is a response... deallocate packet buffer now.
373 delete buf;
374
375 if (!was_nacked_here) {
376 assert(outstandingResponses != 0);

--- 100 unchanged lines hidden ---