1/*
2 * Copyright (c) 2004-2005 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;

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

56 Tick intrDelay;
57 Tick intrTick;
58 bool cpuIntrEnable;
59 bool cpuPendingIntr;
60 void cpuIntrPost(Tick when);
61 void cpuInterrupt();
62 void cpuIntrClear();
63
64 typedef EventWrapper<Base, &Base::cpuInterrupt> IntrEvent;
65 friend void IntrEvent::process();
66 IntrEvent *intrEvent;
64 EventFunctionWrapper *intrEvent;
65 Interface *interface;
66
67 bool cpuIntrPending() const;
68 void cpuIntrAck() { cpuIntrClear(); }
69
70/**
71 * Serialization stuff
72 */

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

189 uint8_t *txDmaData;
190 int txDmaLen;
191
192 protected:
193 void reset();
194
195 void rxKick();
196 Tick rxKickTick;
199 typedef EventWrapper<Device, &Device::rxKick> RxKickEvent;
200 friend void RxKickEvent::process();
197
198 void txKick();
199 Tick txKickTick;
204 typedef EventWrapper<Device, &Device::txKick> TxKickEvent;
205 friend void TxKickEvent::process();
200
201 /**
202 * Retransmit event
203 */
204 void transmit();
205 void txEventTransmit()
206 {
207 transmit();
208 if (txState == txFifoBlock)
209 txKick();
210 }
217 typedef EventWrapper<Device, &Device::txEventTransmit> TxEvent;
218 friend void TxEvent::process();
219 TxEvent txEvent;
211 EventFunctionWrapper txEvent;
212
213 void txDump() const;
214 void rxDump() const;
215
216 /**
217 * receive address filter
218 */
219 bool rxFilter(const EthPacketPtr &packet);

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

232 void transferDone();
233 EtherInt *getEthPort(const std::string &if_name, int idx) override;
234
235/**
236 * DMA parameters
237 */
238 protected:
239 void rxDmaDone();
248 friend class EventWrapper<Device, &Device::rxDmaDone>;
249 EventWrapper<Device, &Device::rxDmaDone> rxDmaEvent;
240 EventFunctionWrapper rxDmaEvent;
241
242 void txDmaDone();
252 friend class EventWrapper<Device, &Device::txDmaDone>;
253 EventWrapper<Device, &Device::txDmaDone> txDmaEvent;
243 EventFunctionWrapper txDmaEvent;
244
245 Tick dmaReadDelay;
246 Tick dmaReadFactor;
247 Tick dmaWriteDelay;
248 Tick dmaWriteFactor;
249
250/**
251 * Interrupt management

--- 66 unchanged lines hidden ---