DEC21143.cpp File Reference


Detailed Description

Contains the code for the emulated DEC 21143 NIC device.

Id
DEC21143.cpp,v 1.35 2008/03/26 19:11:01 iamcamiel Exp

X-1.35 Camiel Vanderhoeven 26-MAR-2008 Fix compiler warnings.

X-1.34 Camiel Vanderhoeven 14-MAR-2008 Formatting.

X-1.33 Camiel Vanderhoeven 14-MAR-2008 1. More meaningful exceptions replace throwing (int) 1. 2. U64 macro replaces X64 macro.

X-1.32 Camiel Vanderhoeven 13-MAR-2008 Create init(), start_threads() and stop_threads() functions.

X-1.31 Camiel Vanderhoeven 05-MAR-2008 Multi-threading version.

X-1.30 Camiel Vanderhoeven 02-MAR-2008 Natural way to specify large numeric values ("10M") in the config file.

X-1.29 Brian Wheeler 29-FEB-2008 Compute SROM checksum. Tru64 needs this.

X-1.28 David Hittner 26-FEB-2008 Major rewrite. Real internal loopback support, ring queue for incoming packets, and various other improvements.

X-1.27 Camiel Vanderhoeven 24-JAN-2008 Use new CPCIDevice::do_pci_read and CPCIDevice::do_pci_write.

X-1.26 Fang Zhe 08-JAN-2008 Avoid compiler warning.

X-1.25 Fausto Saporito 05-JAN-2008 Fixed typo ( instead of
).

X-1.24 David Hittner 04-JAN-2008 MAC address configurable.

X-1.23 Camiel Vanderhoeven 02-JAN-2008 Ignore OPMODE_OM (loopback mode) bits.

X-1.22 Camiel Vanderhoeven 02-JAN-2008 Replaced USE_NETWORK with HAVE_PCAP.

X-1.21 Camiel Vanderhoeven 30-DEC-2007 Print file id on initialization.

X-1.20 Camiel Vanderhoeven 29-DEC-2007 Compileable with older compilers (VC 6.0). Avoid referencing uninitialized data. Fixed memory-leak.

X-1.19 Camiel Vanderhoeven 28-DEC-2007 Throw exceptions rather than just exiting when errors occur.

X-1.18 Camiel Vanderhoeven 28-DEC-2007 Keep the compiler happy.

X-1.17 Camiel Vanderhoeven 17-DEC-2007 SaveState file format 2.1

X-1.16 Brian Wheeler 10-DEC-2007 Added pthread.h

X-1.15 Camiel Vanderhoeven 10-DEC-2007 Use configurator.

X-1.14 Camiel Vanderhoeven 6-DEC-2007 Identifies itself as DE-500BA.

X-1.13 Camiel Vanderhoeven 2-DEC-2007 Receive network data in a separate thread.

X-1.12 Camiel Vanderhoeven 1-DEC-2007 Moved inclusion of StdAfx.h outside conditional block; necessary for using precompiled headers in Visual C++.

X-1.11 Camiel Vanderhoeven 17-NOV-2007 File should end in a newline.

X-1.10 Camiel Vanderhoeven 17-NOV-2007 Use the standard pcap functions (not the extended windows ones), we want to be compatible.

X-1.9 Camiel Vanderhoeven 17-NOV-2007 Corrected a small "oops" error in getting the DECnet address.

X-1.8 Camiel Vanderhoeven 17-NOV-2007 Get the adapter and DECnet address to use from the configuration file.

X-1.7 Camiel Vanderhoeven 17-NOV-2007 Changed the MAC address into the DigitalE-range.

X-1.6 Camiel Vanderhoeven 16-NOV-2007 Change the packet filter less often (only when required).

X-1.5 Camiel Vanderhoeven 16-NOV-2007 Removed some debug messages, and corrected readout of CSR 12.

X-1.4 Camiel Vanderhoeven 16-NOV-2007 BPF filter used for perfect filtering; more correct behaviour of registers.

X-1.3 Camiel Vanderhoeven 15-NOV-2007 Use pcap for network access.

X-1.2 Camiel Vanderhoeven 14-NOV-2007 Removed some debug messages.

X-1.1 Camiel Vanderhoeven 14-NOV-2007 Initial version for ES40 emulator.

Definition in file DEC21143.cpp.

#include "StdAfx.h"
#include "DEC21143.h"
#include "System.h"

Go to the source code of this file.

Defines

#define MII_STATE_RESET   0
#define MII_STATE_START_WAIT   1
#define MII_STATE_READ_OP   2
#define MII_STATE_READ_PHYADDR_REGADDR   3
#define MII_STATE_A   4
#define MII_STATE_D   5
#define MII_STATE_IDLE   6

Variables

u32 dec21143_cfg_data [64]
u32 dec21143_cfg_mask [64]
static u32 nic_magic1 = 0xDEC21143
static u32 nic_magic2 = 0x21143DEC


Define Documentation

#define MII_STATE_A   4

Definition at line 163 of file DEC21143.cpp.

Referenced by CDEC21143::mii_access().

#define MII_STATE_D   5

Definition at line 164 of file DEC21143.cpp.

Referenced by CDEC21143::mii_access().

#define MII_STATE_IDLE   6

Definition at line 165 of file DEC21143.cpp.

Referenced by CDEC21143::mii_access().

#define MII_STATE_READ_OP   2

Definition at line 161 of file DEC21143.cpp.

Referenced by CDEC21143::mii_access().

#define MII_STATE_READ_PHYADDR_REGADDR   3

Definition at line 162 of file DEC21143.cpp.

Referenced by CDEC21143::mii_access().

#define MII_STATE_RESET   0

Definition at line 159 of file DEC21143.cpp.

Referenced by CDEC21143::mii_access().

#define MII_STATE_START_WAIT   1

Definition at line 160 of file DEC21143.cpp.

Referenced by CDEC21143::mii_access().


Variable Documentation

Initial value:

 {
   0x00191011,  
   0x02800000,  
   0x02000030,  
   0x00000000,  
   0x00000001,  
   0x00000000,  
   0x00000000,  
   0x00000000,  
   0x00000000,  
   0x00000000,  
   0x00000000,  
   0x500b1011,  
   0x00000000,  
   0x00000000,  
   0x00000000,
   0x281401ff,  
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}

Definition at line 212 of file DEC21143.cpp.

Referenced by CDEC21143::init().

Initial value:

 {
   0x00000000,  
   0x0000ffff,  
   0x00000000,  
   0x0000ffff,  
   0xffffff00,  
   0xffffff00,  
   0x00000000,  
   0x00000000,  
   0x00000000,  
   0x00000000,  
   0x00000000,  
   0x00000000,  
   0x00000000,  
   0x00000000,  
   0x00000000,
   0x000000ff,  
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}

Definition at line 234 of file DEC21143.cpp.

Referenced by CDEC21143::init().

u32 nic_magic1 = 0xDEC21143 [static]

Definition at line 1713 of file DEC21143.cpp.

u32 nic_magic2 = 0x21143DEC [static]

Definition at line 1714 of file DEC21143.cpp.


SourceForge.net Logo
Project space on SourceForge.net