projects
/
gem5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix a small bug in parameter processing that would always result
[gem5.git]
/
dev
/
ns_gige.hh
diff --git
a/dev/ns_gige.hh
b/dev/ns_gige.hh
index 79ae00e6496ec42ece855d16404233d11bb54393..82f640db176b61dfd4f186c13443ee9d7ec01d2d 100644
(file)
--- a/
dev/ns_gige.hh
+++ b/
dev/ns_gige.hh
@@
-34,21
+34,15
@@
#ifndef __NS_GIGE_HH__
#define __NS_GIGE_HH__
#ifndef __NS_GIGE_HH__
#define __NS_GIGE_HH__
-
//#include "base/range
.hh"
+
#include "base/statistics
.hh"
#include "dev/etherint.hh"
#include "dev/etherpkt.hh"
#include "dev/etherint.hh"
#include "dev/etherpkt.hh"
-#include "
sim/eventq
.hh"
+#include "
dev/io_device
.hh"
#include "dev/ns_gige_reg.h"
#include "dev/ns_gige_reg.h"
-#include "base/statistics.hh"
#include "dev/pcidev.hh"
#include "dev/tsunami.hh"
#include "dev/pcidev.hh"
#include "dev/tsunami.hh"
-#include "dev/io_device.hh"
#include "mem/bus/bus.hh"
#include "mem/bus/bus.hh"
-
-/** defined by the NS83820 data sheet */
-//these are now params for the device
-//#define MAX_TX_FIFO_SIZE 8192
-//#define MAX_RX_FIFO_SIZE 32768
+#include "sim/eventq.hh"
/** length of ethernet address in bytes */
#define EADDR_LEN 6
/** length of ethernet address in bytes */
#define EADDR_LEN 6
@@
-92,7
+86,10
@@
struct dp_regs {
};
struct dp_rom {
};
struct dp_rom {
- /** for perfect match memory. the linux driver doesn't use any other ROM */
+ /**
+ * for perfect match memory.
+ * the linux driver doesn't use any other ROM
+ */
uint8_t perfectMatch[EADDR_LEN];
};
uint8_t perfectMatch[EADDR_LEN];
};
@@
-189,6
+186,8
@@
class NSGigE : public PciDev
/* tx State Machine */
TxState txState;
/* tx State Machine */
TxState txState;
+ bool txEnable;
+
/** Current Transmit Descriptor Done */
bool CTDD;
/** current amt of free space in txDataFifo in bytes */
/** Current Transmit Descriptor Done */
bool CTDD;
/** current amt of free space in txDataFifo in bytes */
@@
-203,6
+202,8
@@
class NSGigE : public PciDev
/** rx State Machine */
RxState rxState;
/** rx State Machine */
RxState rxState;
+ bool rxEnable;
+
/** Current Receive Descriptor Done */
bool CRDD;
/** num of bytes in the current packet being drained from rxDataFifo */
/** Current Receive Descriptor Done */
bool CRDD;
/** num of bytes in the current packet being drained from rxDataFifo */
@@
-284,7
+285,13
@@
class NSGigE : public PciDev
* Retransmit event
*/
void transmit();
* Retransmit event
*/
void transmit();
- typedef EventWrapper<NSGigE, &NSGigE::transmit> TxEvent;
+ void txEventTransmit()
+ {
+ transmit();
+ if (txState == txFifoBlock)
+ txKick();
+ }
+ typedef EventWrapper<NSGigE, &NSGigE::txEventTransmit> TxEvent;
friend class TxEvent;
TxEvent txEvent;
friend class TxEvent;
TxEvent txEvent;