io_device.cc (2685:a0821abe7132) io_device.cc (2784:6cff1a1c2935)
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;

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

57 snoop.clear();
58 device->addressRanges(resp);
59}
60
61
62void
63PioPort::recvRetry()
64{
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;

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

57 snoop.clear();
58 device->addressRanges(resp);
59}
60
61
62void
63PioPort::recvRetry()
64{
65 Packet* pkt = transmitList.front();
66 if (Port::sendTiming(pkt)) {
67 transmitList.pop_front();
65 bool result = true;
66 while (result && transmitList.size()) {
67 result = Port::sendTiming(transmitList.front());
68 if (result)
69 transmitList.pop_front();
68 }
69}
70
70 }
71}
72
71
72void
73PioPort::SendEvent::process()
74{
75 if (port->Port::sendTiming(packet))
76 return;
77
78 port->transmitList.push_back(packet);
79}
80
81
82
83bool
84PioPort::recvTiming(Packet *pkt)
85{
73void
74PioPort::SendEvent::process()
75{
76 if (port->Port::sendTiming(packet))
77 return;
78
79 port->transmitList.push_back(packet);
80}
81
82
83
84bool
85PioPort::recvTiming(Packet *pkt)
86{
86 Tick latency = device->recvAtomic(pkt);
87 // turn packet around to go back to requester
88 pkt->makeTimingResponse();
89 sendTiming(pkt, latency);
87 if (pkt->result == Packet::Nacked) {
88 pkt->reinitNacked();
89 if (transmitList.size()) {
90 transmitList.push_front(pkt);
91 } else {
92 if (!Port::sendTiming(pkt))
93 transmitList.push_front(pkt);
94 }
95 } else {
96 Tick latency = device->recvAtomic(pkt);
97 // turn packet around to go back to requester
98 pkt->makeTimingResponse();
99 sendTiming(pkt, latency);
100 }
90 return true;
91}
92
93PioDevice::~PioDevice()
94{
95 if (pioPort)
96 delete pioPort;
97}

--- 156 unchanged lines hidden ---
101 return true;
102}
103
104PioDevice::~PioDevice()
105{
106 if (pioPort)
107 delete pioPort;
108}

--- 156 unchanged lines hidden ---