Deleted Added
sdiff udiff text old ( 10525:77787650cbbc ) new ( 10657:8bb4a9717eaa )
full compact
1/*
2 * Copyright (c) 2012-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

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

175 return true;
176}
177
178bool RubyPort::MemMasterPort::recvTimingResp(PacketPtr pkt)
179{
180 // got a response from a device
181 assert(pkt->isResponse());
182
183 // First we must retrieve the request port from the sender State
184 RubyPort::SenderState *senderState =
185 safe_cast<RubyPort::SenderState *>(pkt->popSenderState());
186 MemSlavePort *port = senderState->port;
187 assert(port != NULL);
188 delete senderState;
189
190 // In FS mode, ruby memory will receive pio responses from devices
191 // and it must forward these responses back to the particular CPU.
192 DPRINTF(RubyPort, "Pio response for address %#x, going to %s\n",
193 pkt->getAddr(), port->name());
194
195 // attempt to send the response in the next cycle
196 port->schedTimingResp(pkt, curTick() + g_system_ptr->clockPeriod());
197
198 return true;
199}
200
201bool
202RubyPort::PioSlavePort::recvTimingReq(PacketPtr pkt)

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

241 pkt->pushSenderState(new SenderState(this));
242
243 // send next cycle
244 ruby_port->memMasterPort.schedTimingReq(pkt,
245 curTick() + g_system_ptr->clockPeriod());
246 return true;
247 }
248
249 assert(Address(pkt->getAddr()).getOffset() + pkt->getSize() <=
250 RubySystem::getBlockSizeBytes());
251
252 // Submit the ruby request
253 RequestStatus requestStatus = ruby_port->makeRequest(pkt);
254
255 // If the request successfully issued then we should return true.
256 // Otherwise, we need to tell the port to retry at a later point
257 // and return false.
258 if (requestStatus == RequestStatus_Issued) {
259 // Save the port in the sender state object to be used later to
260 // route the response
261 pkt->pushSenderState(new SenderState(this));
262
263 DPRINTF(RubyPort, "Request %s 0x%x issued\n", pkt->cmdString(),
264 pkt->getAddr());
265 return true;
266 }
267
268 //
269 // Unless one is using the ruby tester, record the stalled M5 port for
270 // later retry when the sequencer becomes free.

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

339 DPRINTF(RubyPort, "Hit callback for %s 0x%x\n", pkt->cmdString(),
340 pkt->getAddr());
341
342 // The packet was destined for memory and has not yet been turned
343 // into a response
344 assert(system->isMemAddr(pkt->getAddr()));
345 assert(pkt->isRequest());
346
347 // First we must retrieve the request port from the sender State
348 RubyPort::SenderState *senderState =
349 safe_cast<RubyPort::SenderState *>(pkt->popSenderState());
350 MemSlavePort *port = senderState->port;
351 assert(port != NULL);
352 delete senderState;
353
354 port->hitCallback(pkt);
355
356 //
357 // If we had to stall the MemSlavePorts, wake them up because the sequencer
358 // likely has free resources now.
359 //
360 if (!retryList.empty()) {
361 //
362 // Record the current list of ports to retry on a temporary list before

--- 205 unchanged lines hidden ---