tport.cc (4493:0757d7c8a0e5) tport.cc (4626:ed8aacb19c03)
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

62bool
63SimpleTimingPort::recvTiming(PacketPtr pkt)
64{
65 // If the device is only a slave, it should only be sending
66 // responses, which should never get nacked. There used to be
67 // code to hanldle nacks here, but I'm pretty sure it didn't work
68 // correctly with the drain code, so that would need to be fixed
69 // if we ever added it back.
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

62bool
63SimpleTimingPort::recvTiming(PacketPtr pkt)
64{
65 // If the device is only a slave, it should only be sending
66 // responses, which should never get nacked. There used to be
67 // code to hanldle nacks here, but I'm pretty sure it didn't work
68 // correctly with the drain code, so that would need to be fixed
69 // if we ever added it back.
70 assert(pkt->result != Packet::Nacked);
70 assert(pkt->isRequest());
71 assert(pkt->result == Packet::Unknown);
72 bool needsResponse = pkt->needsResponse();
71 Tick latency = recvAtomic(pkt);
72 // turn packet around to go back to requester if response expected
73 Tick latency = recvAtomic(pkt);
74 // turn packet around to go back to requester if response expected
73 if (pkt->needsResponse()) {
74 pkt->makeTimingResponse();
75 if (needsResponse) {
76 // recvAtomic() should already have turned packet into atomic response
77 assert(pkt->isResponse());
78 pkt->convertAtomicToTimingResponse();
75 schedSendTiming(pkt, curTick + latency);
79 schedSendTiming(pkt, curTick + latency);
76 }
77 else if (pkt->cmd != MemCmd::UpgradeReq) {
80 } else {
78 delete pkt->req;
79 delete pkt;
80 }
81 return true;
82}
83
84
85void

--- 88 unchanged lines hidden ---
81 delete pkt->req;
82 delete pkt;
83 }
84 return true;
85}
86
87
88void

--- 88 unchanged lines hidden ---