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;

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

251
252 void *txDmaData;
253 Addr txDmaAddr;
254 int txDmaLen;
255 bool doTxDmaRead();
256 bool doTxDmaWrite();
257
258 void rxDmaReadDone();
259 friend class EventWrapper<NSGigE, &NSGigE::rxDmaReadDone>;
260 EventWrapper<NSGigE, &NSGigE::rxDmaReadDone> rxDmaReadEvent;
259 EventFunctionWrapper rxDmaReadEvent;
260
261 void rxDmaWriteDone();
263 friend class EventWrapper<NSGigE, &NSGigE::rxDmaWriteDone>;
264 EventWrapper<NSGigE, &NSGigE::rxDmaWriteDone> rxDmaWriteEvent;
262 EventFunctionWrapper rxDmaWriteEvent;
263
264 void txDmaReadDone();
267 friend class EventWrapper<NSGigE, &NSGigE::txDmaReadDone>;
268 EventWrapper<NSGigE, &NSGigE::txDmaReadDone> txDmaReadEvent;
265 EventFunctionWrapper txDmaReadEvent;
266
267 void txDmaWriteDone();
271 friend class EventWrapper<NSGigE, &NSGigE::txDmaWriteDone>;
272 EventWrapper<NSGigE, &NSGigE::txDmaWriteDone> txDmaWriteEvent;
268 EventFunctionWrapper txDmaWriteEvent;
269
270 bool dmaDescFree;
271 bool dmaDataFree;
272
273 protected:
274 Tick txDelay;
275 Tick rxDelay;
276
277 void txReset();
278 void rxReset();
279 void regsReset();
280
281 void rxKick();
282 Tick rxKickTick;
287 typedef EventWrapper<NSGigE, &NSGigE::rxKick> RxKickEvent;
288 friend void RxKickEvent::process();
289 RxKickEvent rxKickEvent;
283 EventFunctionWrapper rxKickEvent;
284
285 void txKick();
286 Tick txKickTick;
293 typedef EventWrapper<NSGigE, &NSGigE::txKick> TxKickEvent;
294 friend void TxKickEvent::process();
295 TxKickEvent txKickEvent;
287 EventFunctionWrapper txKickEvent;
288
289 void eepromKick();
290
291 /**
292 * Retransmit event
293 */
294 void transmit();
295 void txEventTransmit()
296 {
297 transmit();
298 if (txState == txFifoBlock)
299 txKick();
300 }
309 typedef EventWrapper<NSGigE, &NSGigE::txEventTransmit> TxEvent;
310 friend void TxEvent::process();
311 TxEvent txEvent;
301 EventFunctionWrapper txEvent;
302
303 void txDump() const;
304 void rxDump() const;
305
306 /**
307 * receive address filter
308 */
309 bool rxFilterEnable;

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

324
325 Tick intrDelay;
326 Tick intrTick;
327 bool cpuPendingIntr;
328 void cpuIntrPost(Tick when);
329 void cpuInterrupt();
330 void cpuIntrClear();
331
342 typedef EventWrapper<NSGigE, &NSGigE::cpuInterrupt> IntrEvent;
343 friend void IntrEvent::process();
344 IntrEvent *intrEvent;
332 EventFunctionWrapper *intrEvent;
333 NSGigEInt *interface;
334
335 public:
336 typedef NSGigEParams Params;
337 const Params *params() const {
338 return dynamic_cast<const Params *>(_params);
339 }
340

--- 40 unchanged lines hidden ---