bridge.cc (9294:8fb03b13de02) bridge.cc (9542:683991c46ac8)
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

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

196Bridge::BridgeMasterPort::schedTimingReq(PacketPtr pkt, Tick when)
197{
198 // If we expect to see a response, we need to restore the source
199 // and destination field that is potentially changed by a second
200 // bus
201 if (!pkt->memInhibitAsserted() && pkt->needsResponse()) {
202 // Update the sender state so we can deal with the response
203 // appropriately
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

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

196Bridge::BridgeMasterPort::schedTimingReq(PacketPtr pkt, Tick when)
197{
198 // If we expect to see a response, we need to restore the source
199 // and destination field that is potentially changed by a second
200 // bus
201 if (!pkt->memInhibitAsserted() && pkt->needsResponse()) {
202 // Update the sender state so we can deal with the response
203 // appropriately
204 RequestState *req_state = new RequestState(pkt);
205 pkt->senderState = req_state;
204 pkt->pushSenderState(new RequestState(pkt->getSrc()));
206 }
207
208 // If we're about to put this packet at the head of the queue, we
209 // need to schedule an event to do the transmit. Otherwise there
210 // should already be an event scheduled for sending the head
211 // packet.
212 if (transmitList.empty()) {
213 bridge.schedule(sendEvent, when);

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

220
221
222void
223Bridge::BridgeSlavePort::schedTimingResp(PacketPtr pkt, Tick when)
224{
225 // This is a response for a request we forwarded earlier. The
226 // corresponding request state should be stored in the packet's
227 // senderState field.
205 }
206
207 // If we're about to put this packet at the head of the queue, we
208 // need to schedule an event to do the transmit. Otherwise there
209 // should already be an event scheduled for sending the head
210 // packet.
211 if (transmitList.empty()) {
212 bridge.schedule(sendEvent, when);

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

219
220
221void
222Bridge::BridgeSlavePort::schedTimingResp(PacketPtr pkt, Tick when)
223{
224 // This is a response for a request we forwarded earlier. The
225 // corresponding request state should be stored in the packet's
226 // senderState field.
228 RequestState *req_state = dynamic_cast<RequestState*>(pkt->senderState);
227 RequestState *req_state =
228 dynamic_cast<RequestState*>(pkt->popSenderState());
229 assert(req_state != NULL);
229 assert(req_state != NULL);
230 // set up new packet dest & senderState based on values saved
231 // from original request
232 req_state->fixResponse(pkt);
230 pkt->setDest(req_state->origSrc);
233 delete req_state;
234
235 // the bridge assumes that at least one bus has set the
236 // destination field of the packet
237 assert(pkt->isDestValid());
238 DPRINTF(Bridge, "response, new dest %d\n", pkt->getDest());
239
240 // If we're about to put this packet at the head of the queue, we

--- 172 unchanged lines hidden ---
231 delete req_state;
232
233 // the bridge assumes that at least one bus has set the
234 // destination field of the packet
235 assert(pkt->isDestValid());
236 DPRINTF(Bridge, "response, new dest %d\n", pkt->getDest());
237
238 // If we're about to put this packet at the head of the queue, we

--- 172 unchanged lines hidden ---