gem5
v20.1.0.0
|
NS DP83820 Ethernet device model. More...
#include <ns_gige.hh>
Public Types | |
enum | TxState { txIdle, txDescRefr, txDescRead, txFifoBlock, txFragRead, txDescWrite, txAdvance } |
Transmit State Machine states. More... | |
enum | RxState { rxIdle, rxDescRefr, rxDescRead, rxFifoBlock, rxFragWrite, rxDescWrite, rxAdvance } |
Receive State Machine States. More... | |
enum | DmaState { dmaIdle, dmaReading, dmaWriting, dmaReadWaiting, dmaWriteWaiting } |
enum | EEPROMState { eepromStart, eepromGetOpcode, eepromGetAddress, eepromRead } |
EEPROM State Machine States. More... | |
typedef NSGigEParams | Params |
Public Types inherited from EtherDevice | |
typedef EtherDeviceParams | Params |
Public Types inherited from DmaDevice | |
typedef DmaDeviceParams | Params |
Public Types inherited from PioDevice | |
typedef PioDeviceParams | Params |
Public Types inherited from ClockedObject | |
typedef ClockedObjectParams | Params |
Parameters of ClockedObject. More... | |
Public Types inherited from SimObject | |
typedef SimObjectParams | Params |
Public Member Functions | |
const Params * | params () const |
NSGigE (Params *params) | |
~NSGigE () | |
Port & | getPort (const std::string &if_name, PortID idx=InvalidPortID) override |
Get a port with a given name and index. More... | |
Tick | writeConfig (PacketPtr pkt) override |
This is to write to the PCI general configuration registers. More... | |
Tick | read (PacketPtr pkt) override |
This reads the device registers, which are detailed in the NS83820 spec sheet. More... | |
Tick | write (PacketPtr pkt) override |
Pure virtual function that the device must implement. More... | |
bool | cpuIntrPending () const |
void | cpuIntrAck () |
bool | recvPacket (EthPacketPtr packet) |
void | transferDone () |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
void | drainResume () override |
Resume execution after a successful drain. More... | |
Public Member Functions inherited from EtherDevBase | |
EtherDevBase (const EtherDevBaseParams *params) | |
const EtherDevBaseParams * | params () const |
Public Member Functions inherited from EtherDevice | |
EtherDevice (const Params *params) | |
const Params * | params () const |
void | regStats () |
Callback to set stat parameters. More... | |
Public Member Functions inherited from PciDevice | |
virtual Tick | readConfig (PacketPtr pkt) |
Read from the PCI config space data that is stored locally. More... | |
Addr | pciToDma (Addr pci_addr) const |
void | intrPost () |
void | intrClear () |
uint8_t | interruptLine () const |
AddrRangeList | getAddrRanges () const override |
Determine the address ranges that this device responds to. More... | |
PciDevice (const PciDeviceParams *params) | |
Constructor for PCI Dev. More... | |
void | serialize (CheckpointOut &cp) const override |
Serialize this object to the given output stream. More... | |
void | unserialize (CheckpointIn &cp) override |
Reconstruct the state of this object from a checkpoint. More... | |
const PciBusAddr & | busAddr () const |
Public Member Functions inherited from DmaDevice | |
DmaDevice (const Params *p) | |
virtual | ~DmaDevice () |
void | dmaWrite (Addr addr, int size, Event *event, uint8_t *data, uint32_t sid, uint32_t ssid, Tick delay=0) |
void | dmaWrite (Addr addr, int size, Event *event, uint8_t *data, Tick delay=0) |
void | dmaRead (Addr addr, int size, Event *event, uint8_t *data, uint32_t sid, uint32_t ssid, Tick delay=0) |
void | dmaRead (Addr addr, int size, Event *event, uint8_t *data, Tick delay=0) |
bool | dmaPending () const |
void | init () override |
init() is called after all C++ SimObjects have been created and all ports are connected. More... | |
unsigned int | cacheBlockSize () const |
Public Member Functions inherited from PioDevice | |
PioDevice (const Params *p) | |
virtual | ~PioDevice () |
const Params * | params () const |
void | init () override |
init() is called after all C++ SimObjects have been created and all ports are connected. More... | |
Public Member Functions inherited from ClockedObject | |
ClockedObject (const ClockedObjectParams *p) | |
const Params * | params () const |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
Public Member Functions inherited from SimObject | |
const Params * | params () const |
SimObject (const Params *_params) | |
virtual | ~SimObject () |
virtual const std::string | name () const |
virtual void | loadState (CheckpointIn &cp) |
loadState() is called on each SimObject when restoring from a checkpoint. More... | |
virtual void | initState () |
initState() is called on each SimObject when not restoring from a checkpoint. More... | |
virtual void | regProbePoints () |
Register probe points for this object. More... | |
virtual void | regProbeListeners () |
Register probe listeners for this object. More... | |
ProbeManager * | getProbeManager () |
Get the probe manager for this object. More... | |
virtual void | startup () |
startup() is the final initialization call before simulation. More... | |
DrainState | drain () override |
Provide a default implementation of the drain interface for objects that don't need draining. More... | |
virtual void | memWriteback () |
Write back dirty buffers to memory using functional writes. More... | |
virtual void | memInvalidate () |
Invalidate the contents of memory buffers. More... | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
Public Member Functions inherited from EventManager | |
EventQueue * | eventQueue () const |
void | schedule (Event &event, Tick when) |
void | deschedule (Event &event) |
void | reschedule (Event &event, Tick when, bool always=false) |
void | schedule (Event *event, Tick when) |
void | deschedule (Event *event) |
void | reschedule (Event *event, Tick when, bool always=false) |
void | wakeupEventQueue (Tick when=(Tick) -1) |
This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers. More... | |
void | setCurTick (Tick newVal) |
EventManager (EventManager &em) | |
Event manger manages events in the event queue. More... | |
EventManager (EventManager *em) | |
EventManager (EventQueue *eq) | |
Public Member Functions inherited from Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. More... | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. More... | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Public Member Functions inherited from Drainable | |
DrainState | drainState () const |
Return the current drain state of an object. More... | |
virtual void | notifyFork () |
Notify a child process of a fork. More... | |
Public Member Functions inherited from Stats::Group | |
Group (Group *parent, const char *name=nullptr) | |
Construct a new statistics group. More... | |
virtual | ~Group () |
virtual void | resetStats () |
Callback to reset stats. More... | |
virtual void | preDumpStats () |
Callback before stats are dumped. More... | |
void | addStat (Stats::Info *info) |
Register a stat with this group. More... | |
const std::map< std::string, Group * > & | getStatGroups () const |
Get all child groups associated with this object. More... | |
const std::vector< Info * > & | getStats () const |
Get all stats associated with this object. More... | |
void | addStatGroup (const char *name, Group *block) |
Add a stat block as a child of this block. More... | |
const Info * | resolveStat (std::string name) const |
Resolve a stat by its name within this group. More... | |
Group ()=delete | |
Group (const Group &)=delete | |
Group & | operator= (const Group &)=delete |
Public Member Functions inherited from Clocked | |
void | updateClockPeriod () |
Update the tick to the current tick. More... | |
Tick | clockEdge (Cycles cycles=Cycles(0)) const |
Determine the tick when a cycle begins, by default the current one, but the argument also enables the caller to determine a future cycle. More... | |
Cycles | curCycle () const |
Determine the current cycle, corresponding to a tick aligned to a clock edge. More... | |
Tick | nextCycle () const |
Based on the clock of the object, determine the start tick of the first cycle that is at least one cycle in the future. More... | |
uint64_t | frequency () const |
Tick | clockPeriod () const |
double | voltage () const |
Cycles | ticksToCycles (Tick t) const |
Tick | cyclesToTicks (Cycles c) const |
Protected Member Functions | |
bool | doRxDmaRead () |
bool | doRxDmaWrite () |
bool | doTxDmaRead () |
bool | doTxDmaWrite () |
void | rxDmaReadDone () |
void | rxDmaWriteDone () |
void | txDmaReadDone () |
void | txDmaWriteDone () |
void | txReset () |
void | rxReset () |
void | regsReset () |
void | rxKick () |
void | txKick () |
void | eepromKick () |
Advance the EEPROM state machine Called on rising edge of EEPROM clock bit in MEAR. More... | |
void | transmit () |
Retransmit event. More... | |
void | txEventTransmit () |
void | txDump () const |
void | rxDump () const |
bool | rxFilter (const EthPacketPtr &packet) |
void | devIntrPost (uint32_t interrupts) |
Interrupt management. More... | |
void | devIntrClear (uint32_t interrupts) |
void | devIntrChangeMask () |
void | cpuIntrPost (Tick when) |
void | cpuInterrupt () |
void | cpuIntrClear () |
Protected Member Functions inherited from PciDevice | |
bool | isLargeBAR (int bar) const |
Does the given BAR represent 32 lower bits of a 64-bit address? More... | |
bool | isBAR (Addr addr, int bar) const |
Does the given address lie within the space mapped by the given base address register? More... | |
int | getBAR (Addr addr) |
Which base address register (if any) maps the given address? More... | |
bool | getBAR (Addr addr, int &bar, Addr &offs) |
Which base address register (if any) maps the given address? More... | |
Protected Member Functions inherited from Drainable | |
Drainable () | |
virtual | ~Drainable () |
void | signalDrainDone () const |
Signal that an object is drained. More... | |
Protected Member Functions inherited from Clocked | |
Clocked (ClockDomain &clk_domain) | |
Create a clocked object and set the clock domain based on the parameters. More... | |
Clocked (Clocked &)=delete | |
Clocked & | operator= (Clocked &)=delete |
virtual | ~Clocked () |
Virtual destructor due to inheritance. More... | |
void | resetClock () const |
Reset the object's clock using the current global tick value. More... | |
virtual void | clockPeriodUpdated () |
A hook subclasses can implement so they can do any extra work that's needed when the clock rate is changed. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from SimObject | |
static void | serializeAll (CheckpointOut &cp) |
Serialize all SimObjects in the system. More... | |
static SimObject * | find (const char *name) |
Find the SimObject with the given name and return a pointer to it. More... | |
Static Public Member Functions inherited from Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
Serializes all the SimObjects. More... | |
static void | unserializeGlobals (CheckpointIn &cp) |
Public Attributes inherited from ClockedObject | |
PowerState * | powerState |
NS DP83820 Ethernet device model.
Definition at line 118 of file ns_gige.hh.
typedef NSGigEParams NSGigE::Params |
Definition at line 329 of file ns_gige.hh.
enum NSGigE::DmaState |
Enumerator | |
---|---|
dmaIdle | |
dmaReading | |
dmaWriting | |
dmaReadWaiting | |
dmaWriteWaiting |
Definition at line 145 of file ns_gige.hh.
enum NSGigE::EEPROMState |
EEPROM State Machine States.
Enumerator | |
---|---|
eepromStart | |
eepromGetOpcode | |
eepromGetAddress | |
eepromRead |
Definition at line 155 of file ns_gige.hh.
enum NSGigE::RxState |
Receive State Machine States.
Enumerator | |
---|---|
rxIdle | |
rxDescRefr | |
rxDescRead | |
rxFifoBlock | |
rxFragWrite | |
rxDescWrite | |
rxAdvance |
Definition at line 134 of file ns_gige.hh.
enum NSGigE::TxState |
Transmit State Machine states.
Enumerator | |
---|---|
txIdle | |
txDescRefr | |
txDescRead | |
txFifoBlock | |
txFragRead | |
txDescWrite | |
txAdvance |
Definition at line 122 of file ns_gige.hh.
NSGigE::NSGigE | ( | Params * | params | ) |
Definition at line 94 of file ns_gige.cc.
References rxDmaReadDone().
NSGigE::~NSGigE | ( | ) |
Definition at line 139 of file ns_gige.cc.
References interface.
|
protected |
Definition at line 877 of file ns_gige.cc.
References cpuPendingIntr, curTick(), DPRINTF, intrEvent, PciDevice::intrPost(), and intrTick.
Referenced by cpuIntrPost(), and unserialize().
|
inline |
Definition at line 346 of file ns_gige.hh.
References cpuIntrClear().
|
protected |
Definition at line 900 of file ns_gige.cc.
References cpuPendingIntr, DPRINTF, PciDevice::intrClear(), intrEvent, intrTick, and Event::squash().
Referenced by cpuIntrAck(), devIntrChangeMask(), and devIntrClear().
bool NSGigE::cpuIntrPending | ( | ) | const |
Definition at line 919 of file ns_gige.cc.
References cpuPendingIntr.
|
protected |
Definition at line 841 of file ns_gige.cc.
References cpuInterrupt(), curTick(), DPRINTF, intrEvent, intrTick, SimObject::name(), EventManager::schedule(), and Event::squash().
Referenced by devIntrChangeMask(), and devIntrPost().
|
protected |
Definition at line 829 of file ns_gige.cc.
References cpuIntrClear(), cpuIntrPost(), curTick(), DPRINTF, dp_regs::imr, dp_regs::isr, and regs.
Referenced by write().
|
protected |
Definition at line 787 of file ns_gige.cc.
References cpuIntrClear(), DPRINTF, dp_regs::imr, dp_regs::isr, ISR_NOIMPL, ISR_RESERVE, ISR_RXDESC, ISR_RXIDLE, ISR_RXOK, ISR_RXORN, ISR_SWI, ISR_TXDESC, ISR_TXIDLE, ISR_TXOK, panic, EtherDevice::postedRxDesc, EtherDevice::postedRxIdle, EtherDevice::postedRxOk, EtherDevice::postedRxOrn, EtherDevice::postedSwi, EtherDevice::postedTxDesc, EtherDevice::postedTxIdle, EtherDevice::postedTxOk, and regs.
Referenced by read().
|
protected |
Interrupt management.
Definition at line 730 of file ns_gige.cc.
References cpuIntrPost(), curTick(), DPRINTF, dp_regs::imr, intrDelay, dp_regs::isr, ISR_IMPL, ISR_NODELAY, ISR_NOIMPL, ISR_RESERVE, ISR_RXDESC, ISR_RXIDLE, ISR_RXOK, ISR_RXORN, ISR_SWI, ISR_TXDESC, ISR_TXIDLE, ISR_TXOK, panic, EtherDevice::postedInterrupts, regs, EtherDevice::totalRxDesc, EtherDevice::totalRxIdle, EtherDevice::totalRxOk, EtherDevice::totalRxOrn, EtherDevice::totalSwi, EtherDevice::totalTxDesc, EtherDevice::totalTxIdle, EtherDevice::totalTxOk, and warn.
Referenced by recvPacket(), rxKick(), transmit(), txKick(), and write().
|
protected |
Definition at line 976 of file ns_gige.cc.
References dmaIdle, DmaDevice::dmaPending(), DmaDevice::dmaRead(), dmaReading, dmaReadWaiting, Drainable::drainState(), Running, rxDmaAddr, rxDmaData, rxDmaLen, rxDmaReadEvent, and rxDmaState.
Referenced by rxKick().
|
protected |
Definition at line 1007 of file ns_gige.cc.
References dmaIdle, DmaDevice::dmaPending(), DmaDevice::dmaWrite(), dmaWriteWaiting, dmaWriting, Drainable::drainState(), Running, rxDmaAddr, rxDmaData, rxDmaLen, rxDmaState, and rxDmaWriteEvent.
Referenced by rxKick().
|
protected |
Definition at line 1403 of file ns_gige.cc.
References dmaIdle, DmaDevice::dmaPending(), DmaDevice::dmaRead(), dmaReading, dmaReadWaiting, Drainable::drainState(), Running, txDmaAddr, txDmaData, txDmaLen, txDmaReadEvent, and txDmaState.
Referenced by txKick().
|
protected |
Definition at line 1434 of file ns_gige.cc.
References dmaIdle, DmaDevice::dmaPending(), DmaDevice::dmaWrite(), dmaWriteWaiting, dmaWriting, Drainable::drainState(), Running, txDmaAddr, txDmaData, txDmaLen, txDmaState, and txDmaWriteEvent.
Referenced by txKick().
|
overridevirtual |
Resume execution after a successful drain.
Reimplemented from Drainable.
Definition at line 1999 of file ns_gige.cc.
References Drainable::drainResume(), rxKick(), and txKick().
|
protected |
Advance the EEPROM state machine Called on rising edge of EEPROM clock bit in MEAR.
Definition at line 1796 of file ns_gige.cc.
References EEPROM_PMATCH0_ADDR, EEPROM_PMATCH1_ADDR, EEPROM_PMATCH2_ADDR, EEPROM_READ, EEPROM_SIZE, eepromAddress, eepromBitsToRx, eepromData, eepromGetAddress, eepromGetOpcode, eepromOpcode, eepromRead, eepromStart, eepromState, dp_regs::mear, MEAR_EEDI, MEAR_EEDO, panic, dp_rom::perfectMatch, regs, and rom.
Referenced by write().
|
overridevirtual |
Get a port with a given name and index.
This is used at binding time and returns a reference to a protocol-agnostic port.
gem5 has a request and response port interface. All memory objects are connected together via ports. These ports provide a rigid interface between these memory objects. These ports implement three different memory system modes: timing, atomic, and functional. The most important mode is the timing mode and here timing mode is used for conducting cycle-level timing experiments. The other modes are only used in special circumstances and should not be used to conduct cycle-level timing experiments. The other modes are only used in special circumstances. These ports allow SimObjects to communicate with each other.
if_name | Port name |
idx | Index in the case of a VectorPort |
Reimplemented from DmaDevice.
Definition at line 172 of file ns_gige.cc.
References DmaDevice::getPort(), and interface.
|
inline |
This reads the device registers, which are detailed in the NS83820 spec sheet.
Implements PioDevice.
Definition at line 184 of file ns_gige.cc.
References CCSR, dp_regs::ccsr, CFGR, dp_regs::command, dp_regs::config, CR, CR_RXD, CR_RXR, CR_TXD, CR_TXR, devIntrClear(), DPRINTF, FHASH_ADDR, FHASH_SIZE, dp_rom::filterHash, Packet::getAddr(), Packet::getPtr(), Packet::getSize(), GPIOR, dp_regs::gpior, IER, dp_regs::ier, IHR, dp_regs::ihr, IMR, dp_regs::imr, ioEnable, ISR, dp_regs::isr, ISR_ALL, LAST, M5REG, M5REG_RSS, M5REG_RX_THREAD, M5REG_TX_THREAD, Packet::makeAtomicResponse(), MEAR, dp_regs::mear, MIB_END, MIB_START, MIBC, dp_regs::mibc, MIBC_ACLR, MIBC_MIBS, panic, params(), PCR, dp_regs::pcr, dp_rom::perfectMatch, PciDevice::pioDelay, PQCR, dp_regs::pqcr, PTSCR, dp_regs::ptscr, PciDevice::readConfig(), X86ISA::reg, regs, RESERVED, RFCR, dp_regs::rfcr, RFCR_RFADDR, RFDR, rom, RX_CFG, dp_regs::rxcfg, RXDP, dp_regs::rxdp, RXDP_HI, dp_regs::rxdp_hi, Packet::setLE(), SRR, dp_regs::srr, TANAR, dp_regs::tanar, TANER, dp_regs::taner, TANLPAR, dp_regs::tanlpar, TBICR, dp_regs::tbicr, TBISR, dp_regs::tbisr, TESR, dp_regs::tesr, TX_CFG, dp_regs::txcfg, TXDP, dp_regs::txdp, TXDP_HI, dp_regs::txdp_hi, VDR, dp_regs::vdr, VRCR, dp_regs::vrcr, VTCR, dp_regs::vtcr, WCSR, and dp_regs::wcsr.
bool NSGigE::recvPacket | ( | EthPacketPtr | packet | ) |
Definition at line 1949 of file ns_gige.cc.
References PacketFifo::avail(), devIntrPost(), DPRINTF, EtherDevice::droppedPackets, iGbReg::TxdOp::ip(), ISR_RXORN, PacketFifo::push(), EtherDevice::rxBytes, rxEnable, rxFifo, rxFilter(), rxFilterEnable, rxKick(), EtherDevice::rxPackets, and iGbReg::TxdOp::tcp().
Referenced by NSGigEInt::recvPacket().
|
protected |
Definition at line 953 of file ns_gige.cc.
References acceptArp, acceptBroadcast, acceptMulticast, acceptPerfect, acceptUnicast, dp_regs::brar, CFGR_LNKSTS, CFGR_MODE_1000, CFGR_TBI_EN, dp_regs::config, extstsEnable, dp_regs::mear, dp_regs::mibc, MIBC_FRZ, regs, dp_regs::rxcfg, dp_regs::srr, dp_regs::tesr, dp_regs::txcfg, and dp_regs::vdr.
Referenced by write().
|
protected |
Definition at line 990 of file ns_gige.cc.
References DDUMP, dmaIdle, dmaReading, dmaReadWaiting, dmaWriteWaiting, DPRINTF, rxDmaAddr, rxDmaData, rxDmaLen, rxDmaState, rxKick(), txDmaState, and txKick().
Referenced by NSGigE().
|
protected |
Definition at line 1020 of file ns_gige.cc.
References DDUMP, dmaIdle, dmaReadWaiting, dmaWriteWaiting, dmaWriting, DPRINTF, rxDmaAddr, rxDmaData, rxDmaLen, rxDmaState, rxKick(), txDmaState, and txKick().
|
protected |
|
protected |
Definition at line 1906 of file ns_gige.cc.
References acceptArp, acceptBroadcast, acceptMulticast, acceptPerfect, acceptUnicast, Net::EthAddr::broadcast(), DDUMP, DPRINTF, Net::EthHdr::dst(), Net::EthAddr::multicast(), multicastHashEnable, dp_rom::perfectMatch, rom, Net::EthHdr::type(), type, and Net::EthAddr::unicast().
Referenced by recvPacket().
|
protected |
Definition at line 1037 of file ns_gige.cc.
References ns_desc32::bufptr, ns_desc64::bufptr, CFGR_M64ADDR, Net::cksum(), Clocked::clockEdge(), ns_desc32::cmdsts, ns_desc64::cmdsts, CMDSTS_INTR, CMDSTS_LEN_MASK, CMDSTS_MORE, CMDSTS_OK, CMDSTS_OWN, dp_regs::config, CRDD, curTick(), EtherDevice::descDmaRdBytes, EtherDevice::descDmaReads, EtherDevice::descDmaWrBytes, EtherDevice::descDmaWrites, devIntrPost(), dmaDataFree, dmaDescFree, dmaIdle, dmaReadWaiting, dmaWriteWaiting, doRxDmaRead(), doRxDmaWrite(), DPRINTF, DTRACE, PacketFifo::empty(), X86ISA::exit, ns_desc32::extsts, ns_desc64::extsts, EXTSTS_IPERR, EXTSTS_IPPKT, EXTSTS_TCPERR, EXTSTS_TCPPKT, EXTSTS_UDPERR, EXTSTS_UDPPKT, extstsEnable, PacketFifo::front(), iGbReg::TxdOp::ip(), ISR_RXDESC, ISR_RXIDLE, ISR_RXOK, ns_desc32::link, ns_desc64::link, NsRxStateStrings, panic, PacketFifo::pop(), regs, rxAdvance, rxDesc32, rxDesc64, rxDescCnt, rxDescRead, rxDescRefr, rxDescWrite, rxDmaAddr, rxDmaData, rxDmaFree, rxDmaLen, rxDmaState, dp_regs::rxdp, rxEnable, rxFifo, rxFifoBlock, rxFragPtr, rxFragWrite, rxIdle, EtherDevice::rxIpChecksums, rxKickEvent, rxKickTick, rxPacket, rxPacketBufPtr, rxPktBytes, rxState, EtherDevice::rxTcpChecksums, EtherDevice::rxUdpChecksums, rxXferLen, EventManager::schedule(), Event::scheduled(), PacketFifo::size(), and iGbReg::TxdOp::tcp().
Referenced by drainResume(), recvPacket(), rxDmaReadDone(), rxDmaWriteDone(), txDmaReadDone(), txDmaWriteDone(), and write().
|
protected |
Definition at line 938 of file ns_gige.cc.
References PacketFifo::clear(), CRDD, dmaIdle, DPRINTF, rxDescCnt, rxDmaState, rxEnable, rxFifo, rxFragPtr, rxIdle, rxPktBytes, and rxState.
Referenced by write().
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 2015 of file ns_gige.cc.
References acceptArp, acceptBroadcast, acceptMulticast, acceptPerfect, acceptUnicast, dp_regs::brar, dp_regs::brdr, ns_desc32::bufptr, ns_desc64::bufptr, dp_regs::ccsr, ns_desc32::cmdsts, ns_desc64::cmdsts, dp_regs::command, dp_regs::config, cpuPendingIntr, CRDD, CTDD, curTick(), eepromAddress, eepromBitsToRx, eepromClk, eepromData, eepromOpcode, eepromState, ns_desc32::extsts, ns_desc64::extsts, extstsEnable, FHASH_SIZE, dp_rom::filterHash, dp_regs::gpior, dp_regs::ier, dp_regs::ihr, dp_regs::imr, intrEvent, intrTick, ioEnable, dp_regs::isr, ns_desc32::link, ns_desc64::link, dp_regs::mear, dp_regs::mibc, multicastHashEnable, dp_regs::pcr, dp_rom::perfectMatch, dp_regs::pqcr, dp_regs::ptscr, regs, dp_regs::rfcr, dp_regs::rfdr, rom, dp_regs::rxcfg, rxDesc32, rxDesc64, rxDescCnt, rxDmaState, dp_regs::rxdp, dp_regs::rxdp_hi, rxEnable, rxFifo, rxFilterEnable, rxFragPtr, rxKickTick, rxPacket, rxPacketBufPtr, rxPktBytes, rxState, rxXferLen, Event::scheduled(), PacketFifo::serialize(), PciDevice::serialize(), SERIALIZE_ARRAY, SERIALIZE_SCALAR, dp_regs::srr, dp_regs::tanar, dp_regs::taner, dp_regs::tanlpar, dp_regs::tbicr, dp_regs::tbisr, dp_regs::tesr, dp_regs::txcfg, txDesc32, txDesc64, txDescCnt, txDmaState, dp_regs::txdp, dp_regs::txdp_hi, txEnable, txEvent, txFifo, txFragPtr, txKickTick, txPacket, txPacketBufPtr, txState, txXferLen, dp_regs::vdr, dp_regs::vrcr, dp_regs::vtcr, dp_regs::wcsr, and Event::when().
void NSGigE::transferDone | ( | ) |
Definition at line 1893 of file ns_gige.cc.
References Clocked::clockEdge(), DPRINTF, PacketFifo::empty(), EventManager::reschedule(), txEvent, and txFifo.
Referenced by NSGigEInt::sendDone().
|
protected |
Retransmit event.
Definition at line 1352 of file ns_gige.cc.
References PacketFifo::avail(), curTick(), DDUMP, devIntrPost(), DPRINTF, DTRACE, PacketFifo::empty(), PacketFifo::front(), interface, iGbReg::TxdOp::ip(), ISR_TXOK, SimClock::Int::ns, PacketFifo::pop(), EventManager::schedule(), Event::scheduled(), EtherInt::sendPacket(), PacketFifo::size(), iGbReg::TxdOp::tcp(), EtherDevice::txBytes, txEvent, txFifo, and EtherDevice::txPackets.
Referenced by txEventTransmit(), and txKick().
|
protected |
Definition at line 1417 of file ns_gige.cc.
References DDUMP, dmaIdle, dmaReading, dmaReadWaiting, dmaWriteWaiting, DPRINTF, rxDmaState, rxKick(), txDmaAddr, txDmaData, txDmaLen, txDmaState, and txKick().
|
protected |
Definition at line 1447 of file ns_gige.cc.
References DDUMP, dmaIdle, dmaReadWaiting, dmaWriteWaiting, dmaWriting, DPRINTF, rxDmaState, rxKick(), txDmaAddr, txDmaData, txDmaLen, txDmaState, and txKick().
|
protected |
|
inlineprotected |
Definition at line 288 of file ns_gige.hh.
References transmit(), txFifoBlock, txKick(), and txState.
|
protected |
Definition at line 1464 of file ns_gige.cc.
References PacketFifo::avail(), Debug::breakpoint(), ns_desc32::bufptr, ns_desc64::bufptr, CFGR_M64ADDR, Net::cksum(), Clocked::clockEdge(), ns_desc32::cmdsts, ns_desc64::cmdsts, CMDSTS_INTR, CMDSTS_LEN_MASK, CMDSTS_MORE, CMDSTS_OK, CMDSTS_OWN, dp_regs::config, CTDD, curTick(), EtherDevice::descDmaRdBytes, EtherDevice::descDmaReads, EtherDevice::descDmaWrBytes, EtherDevice::descDmaWrites, devIntrPost(), dmaDataFree, dmaDescFree, dmaIdle, dmaReadWaiting, dmaWriteWaiting, doTxDmaRead(), doTxDmaWrite(), DPRINTF, X86ISA::exit, ns_desc32::extsts, ns_desc64::extsts, EXTSTS_IPPKT, EXTSTS_TCPPKT, EXTSTS_UDPPKT, extstsEnable, PacketFifo::full(), iGbReg::TxdOp::ip(), ISR_TXDESC, ISR_TXIDLE, ns_desc32::link, ns_desc64::link, NsTxStateStrings, panic, PacketFifo::push(), regs, PacketFifo::reserve(), EventManager::schedule(), Event::scheduled(), Net::UdpHdr::sum(), iGbReg::TxdOp::tcp(), transmit(), txAdvance, txDesc32, txDesc64, txDescCnt, txDescRead, txDescRefr, txDescWrite, txDmaAddr, txDmaData, txDmaFree, txDmaLen, txDmaState, dp_regs::txdp, txEnable, txFifo, txFifoBlock, txFragPtr, txFragRead, txIdle, EtherDevice::txIpChecksums, txKickEvent, txKickTick, txPacket, txPacketBufPtr, txState, EtherDevice::txTcpChecksums, EtherDevice::txUdpChecksums, txXferLen, dp_regs::vtcr, VTCR_PPCHK, and warn_once.
Referenced by drainResume(), rxDmaReadDone(), rxDmaWriteDone(), txDmaReadDone(), txDmaWriteDone(), txEventTransmit(), and write().
|
protected |
Definition at line 923 of file ns_gige.cc.
References PacketFifo::clear(), CTDD, dmaIdle, DPRINTF, txDescCnt, txDmaState, txEnable, txFifo, txFragPtr, txIdle, and txState.
Referenced by write().
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 2188 of file ns_gige.cc.
References acceptArp, acceptBroadcast, acceptMulticast, acceptPerfect, acceptUnicast, dp_regs::brar, dp_regs::brdr, ns_desc32::bufptr, ns_desc64::bufptr, dp_regs::ccsr, ns_desc32::cmdsts, ns_desc64::cmdsts, dp_regs::command, dp_regs::config, cpuInterrupt(), cpuPendingIntr, CRDD, CTDD, curTick(), eepromAddress, eepromBitsToRx, eepromClk, eepromData, eepromOpcode, eepromState, ns_desc32::extsts, ns_desc64::extsts, extstsEnable, FHASH_SIZE, dp_rom::filterHash, dp_regs::gpior, dp_regs::ier, dp_regs::ihr, dp_regs::imr, intrEvent, intrTick, ioEnable, dp_regs::isr, ns_desc32::link, ns_desc64::link, dp_regs::mear, dp_regs::mibc, multicastHashEnable, SimObject::name(), dp_regs::pcr, dp_rom::perfectMatch, dp_regs::pqcr, dp_regs::ptscr, regs, dp_regs::rfcr, dp_regs::rfdr, rom, dp_regs::rxcfg, rxDesc32, rxDesc64, rxDescCnt, rxDmaState, dp_regs::rxdp, dp_regs::rxdp_hi, rxEnable, rxFifo, rxFilterEnable, rxFragPtr, rxKickEvent, rxKickTick, rxPacket, rxPacketBufPtr, rxPktBytes, rxState, rxXferLen, EventManager::schedule(), dp_regs::srr, dp_regs::tanar, dp_regs::taner, dp_regs::tanlpar, dp_regs::tbicr, dp_regs::tbisr, dp_regs::tesr, dp_regs::txcfg, txDesc32, txDesc64, txDescCnt, txDmaState, dp_regs::txdp, dp_regs::txdp_hi, txEnable, txEvent, txFifo, txFragPtr, txKickEvent, txKickTick, txPacket, txPacketBufPtr, txState, txXferLen, PacketFifo::unserialize(), PciDevice::unserialize(), UNSERIALIZE_ARRAY, UNSERIALIZE_SCALAR, dp_regs::vdr, dp_regs::vrcr, dp_regs::vtcr, and dp_regs::wcsr.
Pure virtual function that the device must implement.
Called when a write command is recieved by the port.
pkt | Packet describing this request |
Implements PioDevice.
Definition at line 406 of file ns_gige.cc.
References acceptArp, acceptBroadcast, acceptMulticast, acceptPerfect, acceptUnicast, BRAR, dp_regs::brar, BRDR, CCSR, dp_regs::ccsr, CFGR, CFGR_AUTO_1000, CFGR_DUPSTS, CFGR_EXTSTS_EN, CFGR_LNKSTS, CFGR_PCI64_DET, CFGR_RESERVED, CFGR_SPDSTS, CFGR_T64ADDR, dp_regs::command, dp_regs::config, CR, CR_RST, CR_RXD, CR_RXE, CR_RXR, CR_SWI, CR_TXD, CR_TXE, CR_TXR, CRDD, CTDD, devIntrChangeMask(), devIntrPost(), DPRINTF, eepromClk, eepromKick(), eepromStart, eepromState, extstsEnable, FHASH_ADDR, FHASH_SIZE, dp_rom::filterHash, Packet::getAddr(), Packet::getLE(), Packet::getSize(), GPIOR, dp_regs::gpior, GPIOR_GP1_IN, GPIOR_GP2_IN, GPIOR_GP3_IN, GPIOR_GP4_IN, GPIOR_GP5_IN, GPIOR_UNUSED, IER, dp_regs::ier, IHR, dp_regs::ihr, IMR, dp_regs::imr, ioEnable, ISR, ISR_SWI, LAST, Packet::makeAtomicResponse(), MEAR, dp_regs::mear, MEAR_EECLK, MEAR_EEDI, MEAR_EEDO, MEAR_EESEL, MIBC, multicastHashEnable, panic, PCR, dp_regs::pcr, dp_rom::perfectMatch, PciDevice::pioDelay, PQCR, dp_regs::pqcr, PTSCR, dp_regs::ptscr, PTSCR_EEBIST_EN, PTSCR_EELOAD_EN, PTSCR_RBIST_DONE, PTSCR_RBIST_EN, PTSCR_RBIST_RDONLY, X86ISA::reg, regs, regsReset(), RESERVED, RFCR, dp_regs::rfcr, RFCR_AAB, RFCR_AAM, RFCR_AARP, RFCR_AAU, RFCR_APM, RFCR_MHEN, RFCR_RFADDR, RFCR_RFEN, RFCR_UHEN, RFCR_ULM, RFDR, rom, RX_CFG, dp_regs::rxcfg, RXDP, dp_regs::rxdp, RXDP_HI, dp_regs::rxdp_hi, rxEnable, rxFilterEnable, rxIdle, rxKick(), rxReset(), rxState, SRR, TANAR, dp_regs::tanar, TANAR_RF1, TANAR_RF2, TANAR_UNUSED, TANER, TANLPAR, dp_regs::tanlpar, TBICR, dp_regs::tbicr, TBICR_MR_AN_ENABLE, TBICR_MR_LOOPBACK, TBISR, dp_regs::tbisr, TBISR_MR_AN_COMPLETE, TBISR_MR_LINK_STATUS, TESR, dp_regs::tesr, TX_CFG, dp_regs::txcfg, TXDP, dp_regs::txdp, TXDP_HI, dp_regs::txdp_hi, txEnable, txIdle, txKick(), txReset(), txState, VDR, VRCR, dp_regs::vrcr, VTCR, dp_regs::vtcr, WCSR, dp_regs::wcsr, and writeConfig().
This is to write to the PCI general configuration registers.
Reimplemented from PciDevice.
Definition at line 148 of file ns_gige.cc.
References PciDevice::config, PciDevice::configDelay, PCIConfig::data, Packet::getAddr(), ioEnable, ArmISA::offset, panic, PCI_CMD_IOSE, PCI_COMMAND, PCI_CONFIG_SIZE, PCI_DEVICE_SPECIFIC, and PciDevice::writeConfig().
Referenced by write().
|
protected |
Definition at line 308 of file ns_gige.hh.
Referenced by regsReset(), rxFilter(), serialize(), unserialize(), and write().
|
protected |
Definition at line 304 of file ns_gige.hh.
Referenced by regsReset(), rxFilter(), serialize(), unserialize(), and write().
|
protected |
Definition at line 305 of file ns_gige.hh.
Referenced by regsReset(), rxFilter(), serialize(), unserialize(), and write().
|
protected |
Definition at line 307 of file ns_gige.hh.
Referenced by regsReset(), rxFilter(), serialize(), unserialize(), and write().
|
protected |
Definition at line 306 of file ns_gige.hh.
Referenced by regsReset(), rxFilter(), serialize(), unserialize(), and write().
|
protected |
Definition at line 320 of file ns_gige.hh.
Referenced by cpuInterrupt(), cpuIntrClear(), cpuIntrPending(), serialize(), and unserialize().
|
protected |
Current Receive Descriptor Done.
Definition at line 211 of file ns_gige.hh.
Referenced by rxKick(), rxReset(), serialize(), unserialize(), and write().
|
protected |
Current Transmit Descriptor Done.
Definition at line 197 of file ns_gige.hh.
Referenced by serialize(), txKick(), txReset(), unserialize(), and write().
|
protected |
Definition at line 264 of file ns_gige.hh.
|
protected |
Definition at line 263 of file ns_gige.hh.
|
protected |
Definition at line 233 of file ns_gige.hh.
|
protected |
Definition at line 236 of file ns_gige.hh.
|
protected |
Definition at line 234 of file ns_gige.hh.
|
protected |
Definition at line 237 of file ns_gige.hh.
|
protected |
Definition at line 229 of file ns_gige.hh.
Referenced by eepromKick(), serialize(), and unserialize().
|
protected |
Definition at line 227 of file ns_gige.hh.
Referenced by eepromKick(), serialize(), and unserialize().
|
protected |
Definition at line 226 of file ns_gige.hh.
Referenced by serialize(), unserialize(), and write().
|
protected |
Definition at line 230 of file ns_gige.hh.
Referenced by eepromKick(), serialize(), and unserialize().
|
protected |
Definition at line 228 of file ns_gige.hh.
Referenced by eepromKick(), serialize(), and unserialize().
|
protected |
EEPROM State Machine.
Definition at line 225 of file ns_gige.hh.
Referenced by eepromKick(), serialize(), unserialize(), and write().
|
protected |
Definition at line 222 of file ns_gige.hh.
Referenced by regsReset(), rxKick(), serialize(), txKick(), unserialize(), and write().
|
protected |
Definition at line 326 of file ns_gige.hh.
Referenced by getPort(), transmit(), and ~NSGigE().
|
protected |
Definition at line 318 of file ns_gige.hh.
Referenced by devIntrPost().
|
protected |
Definition at line 325 of file ns_gige.hh.
Referenced by cpuInterrupt(), cpuIntrClear(), cpuIntrPost(), serialize(), and unserialize().
|
protected |
Definition at line 319 of file ns_gige.hh.
Referenced by cpuInterrupt(), cpuIntrClear(), cpuIntrPost(), serialize(), and unserialize().
|
protected |
pci settings
Definition at line 169 of file ns_gige.hh.
Referenced by read(), serialize(), unserialize(), write(), and writeConfig().
|
protected |
Definition at line 309 of file ns_gige.hh.
Referenced by rxFilter(), serialize(), unserialize(), and write().
|
protected |
device register file
Definition at line 165 of file ns_gige.hh.
Referenced by devIntrChangeMask(), devIntrClear(), devIntrPost(), eepromKick(), read(), regsReset(), rxKick(), serialize(), txKick(), unserialize(), and write().
|
protected |
Definition at line 166 of file ns_gige.hh.
Referenced by eepromKick(), read(), rxFilter(), serialize(), unserialize(), and write().
|
protected |
Definition at line 268 of file ns_gige.hh.
|
protected |
Definition at line 188 of file ns_gige.hh.
Referenced by rxKick(), serialize(), and unserialize().
|
protected |
Definition at line 190 of file ns_gige.hh.
Referenced by rxKick(), serialize(), and unserialize().
|
protected |
count of bytes remaining in the current descriptor
Definition at line 219 of file ns_gige.hh.
Referenced by rxKick(), rxReset(), serialize(), and unserialize().
|
protected |
Definition at line 240 of file ns_gige.hh.
Referenced by doRxDmaRead(), doRxDmaWrite(), rxDmaReadDone(), rxDmaWriteDone(), and rxKick().
|
protected |
Definition at line 239 of file ns_gige.hh.
Referenced by doRxDmaRead(), doRxDmaWrite(), rxDmaReadDone(), rxDmaWriteDone(), and rxKick().
|
protected |
Definition at line 183 of file ns_gige.hh.
Referenced by rxKick().
|
protected |
Definition at line 241 of file ns_gige.hh.
Referenced by doRxDmaRead(), doRxDmaWrite(), rxDmaReadDone(), rxDmaWriteDone(), and rxKick().
|
protected |
Definition at line 252 of file ns_gige.hh.
Referenced by doRxDmaRead().
|
protected |
Definition at line 220 of file ns_gige.hh.
Referenced by doRxDmaRead(), doRxDmaWrite(), rxDmaReadDone(), rxDmaWriteDone(), rxKick(), rxReset(), serialize(), txDmaReadDone(), txDmaWriteDone(), and unserialize().
|
protected |
Definition at line 255 of file ns_gige.hh.
Referenced by doRxDmaWrite().
|
protected |
Definition at line 208 of file ns_gige.hh.
Referenced by recvPacket(), rxKick(), rxReset(), serialize(), unserialize(), and write().
|
protected |
Definition at line 174 of file ns_gige.hh.
Referenced by recvPacket(), rxKick(), rxReset(), serialize(), and unserialize().
|
protected |
receive address filter
Definition at line 302 of file ns_gige.hh.
Referenced by recvPacket(), serialize(), unserialize(), and write().
|
protected |
ptr to the next byte in current fragment
Definition at line 217 of file ns_gige.hh.
Referenced by rxKick(), rxReset(), serialize(), and unserialize().
|
protected |
halt the rx state machine after current packet
Definition at line 215 of file ns_gige.hh.
|
protected |
Definition at line 276 of file ns_gige.hh.
Referenced by rxKick(), and unserialize().
|
protected |
Definition at line 275 of file ns_gige.hh.
Referenced by rxKick(), serialize(), and unserialize().
|
protected |
Definition at line 178 of file ns_gige.hh.
Referenced by rxKick(), serialize(), and unserialize().
|
protected |
Definition at line 180 of file ns_gige.hh.
Referenced by rxKick(), serialize(), and unserialize().
|
protected |
num of bytes in the current packet being drained from rxDataFifo
Definition at line 213 of file ns_gige.hh.
Referenced by rxKick(), rxReset(), serialize(), and unserialize().
|
protected |
rx State Machine
Definition at line 207 of file ns_gige.hh.
Referenced by rxKick(), rxReset(), serialize(), unserialize(), and write().
|
protected |
Definition at line 182 of file ns_gige.hh.
Referenced by rxKick(), serialize(), and unserialize().
|
protected |
Definition at line 267 of file ns_gige.hh.
|
protected |
DescCaches.
Definition at line 187 of file ns_gige.hh.
Referenced by serialize(), txKick(), and unserialize().
|
protected |
Definition at line 189 of file ns_gige.hh.
Referenced by serialize(), txKick(), and unserialize().
|
protected |
count of bytes remaining in the current descriptor
Definition at line 203 of file ns_gige.hh.
Referenced by serialize(), txKick(), txReset(), and unserialize().
|
protected |
Definition at line 246 of file ns_gige.hh.
Referenced by doTxDmaRead(), doTxDmaWrite(), txDmaReadDone(), txDmaWriteDone(), and txKick().
|
protected |
Definition at line 245 of file ns_gige.hh.
Referenced by doTxDmaRead(), doTxDmaWrite(), txDmaReadDone(), txDmaWriteDone(), and txKick().
|
protected |
Definition at line 184 of file ns_gige.hh.
Referenced by txKick().
|
protected |
Definition at line 247 of file ns_gige.hh.
Referenced by doTxDmaRead(), doTxDmaWrite(), txDmaReadDone(), txDmaWriteDone(), and txKick().
|
protected |
Definition at line 258 of file ns_gige.hh.
Referenced by doTxDmaRead().
|
protected |
Definition at line 204 of file ns_gige.hh.
Referenced by doTxDmaRead(), doTxDmaWrite(), rxDmaReadDone(), rxDmaWriteDone(), serialize(), txDmaReadDone(), txDmaWriteDone(), txKick(), txReset(), and unserialize().
|
protected |
Definition at line 261 of file ns_gige.hh.
Referenced by doTxDmaWrite().
|
protected |
Definition at line 194 of file ns_gige.hh.
Referenced by serialize(), txKick(), txReset(), unserialize(), and write().
|
protected |
Definition at line 294 of file ns_gige.hh.
Referenced by serialize(), transferDone(), transmit(), and unserialize().
|
protected |
Definition at line 173 of file ns_gige.hh.
Referenced by serialize(), transferDone(), transmit(), txKick(), txReset(), and unserialize().
|
protected |
ptr to the next byte in the current fragment
Definition at line 201 of file ns_gige.hh.
Referenced by serialize(), txKick(), txReset(), and unserialize().
|
protected |
halt the tx state machine after next packet
Definition at line 199 of file ns_gige.hh.
|
protected |
Definition at line 280 of file ns_gige.hh.
Referenced by txKick(), and unserialize().
|
protected |
Definition at line 279 of file ns_gige.hh.
Referenced by serialize(), txKick(), and unserialize().
|
protected |
various helper vars
Definition at line 177 of file ns_gige.hh.
Referenced by serialize(), txKick(), and unserialize().
|
protected |
Definition at line 179 of file ns_gige.hh.
Referenced by serialize(), txKick(), and unserialize().
|
protected |
Definition at line 193 of file ns_gige.hh.
Referenced by serialize(), txEventTransmit(), txKick(), txReset(), unserialize(), and write().
|
protected |
Definition at line 181 of file ns_gige.hh.
Referenced by serialize(), txKick(), and unserialize().