summaryrefslogtreecommitdiff
path: root/src/dev/sinic.hh
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-10-09 04:58:23 -0700
committerNathan Binkert <nate@binkert.org>2008-10-09 04:58:23 -0700
commit886c5f8fe5011bf9a610d2bc3cb3bb010c592510 (patch)
tree0d8aeed1ba9de6b052ea891f3a0013a98e1a93fd /src/dev/sinic.hh
parenteb89a23556a16958d9931b93f57b626f20af0ddd (diff)
downloadgem5-886c5f8fe5011bf9a610d2bc3cb3bb010c592510.tar.xz
SINIC: Commit old code from ASPLOS 2006 studies.
NOTE: This code was written by Nathan Binkert in 2006 and is properly copyright "The Regents of the University of Michigan"
Diffstat (limited to 'src/dev/sinic.hh')
-rw-r--r--src/dev/sinic.hh45
1 files changed, 31 insertions, 14 deletions
diff --git a/src/dev/sinic.hh b/src/dev/sinic.hh
index e85d93fe4..3185e8696 100644
--- a/src/dev/sinic.hh
+++ b/src/dev/sinic.hh
@@ -115,19 +115,24 @@ class Device : public Base
uint32_t IntrMask; // 0x0c
uint32_t RxMaxCopy; // 0x10
uint32_t TxMaxCopy; // 0x14
- uint32_t RxMaxIntr; // 0x18
- uint32_t VirtualCount; // 0x1c
- uint32_t RxFifoSize; // 0x20
- uint32_t TxFifoSize; // 0x24
- uint32_t RxFifoMark; // 0x28
- uint32_t TxFifoMark; // 0x2c
- uint64_t RxData; // 0x30
- uint64_t RxDone; // 0x38
- uint64_t RxWait; // 0x40
- uint64_t TxData; // 0x48
- uint64_t TxDone; // 0x50
- uint64_t TxWait; // 0x58
- uint64_t HwAddr; // 0x60
+ uint32_t ZeroCopySize; // 0x18
+ uint32_t ZeroCopyMark; // 0x1c
+ uint32_t VirtualCount; // 0x20
+ uint32_t RxMaxIntr; // 0x24
+ uint32_t RxFifoSize; // 0x28
+ uint32_t TxFifoSize; // 0x2c
+ uint32_t RxFifoLow; // 0x30
+ uint32_t TxFifoLow; // 0x34
+ uint32_t RxFifoHigh; // 0x38
+ uint32_t TxFifoHigh; // 0x3c
+ uint64_t RxData; // 0x40
+ uint64_t RxDone; // 0x48
+ uint64_t RxWait; // 0x50
+ uint64_t TxData; // 0x58
+ uint64_t TxDone; // 0x60
+ uint64_t TxWait; // 0x68
+ uint64_t HwAddr; // 0x70
+ uint64_t RxStatus; // 0x78
} regs;
struct VirtualReg {
@@ -136,7 +141,7 @@ class Device : public Base
uint64_t TxData;
uint64_t TxDone;
- PacketFifo::iterator rxPacket;
+ PacketFifo::iterator rxIndex;
int rxPacketOffset;
int rxPacketBytes;
uint64_t rxDoneData;
@@ -159,6 +164,10 @@ class Device : public Base
int rxActive;
VirtualList txList;
+ int rxBusyCount;
+ int rxMappedCount;
+ int rxDirtyCount;
+
uint8_t &regData8(Addr daddr) { return *((uint8_t *)&regs + daddr); }
uint32_t &regData32(Addr daddr) { return *(uint32_t *)&regData8(daddr); }
uint64_t &regData64(Addr daddr) { return *(uint64_t *)&regData8(daddr); }
@@ -300,8 +309,16 @@ class Device : public Base
Stats::Scalar<> txTcpChecksums;
Stats::Scalar<> txUdpChecksums;
+ Stats::Scalar<> totalVnicDistance;
+ Stats::Scalar<> numVnicDistance;
+ Stats::Scalar<> maxVnicDistance;
+ Stats::Formula avgVnicDistance;
+
+ int _maxVnicDistance;
+
public:
virtual void regStats();
+ virtual void resetStats();
/**
* Serialization stuff