Visible to Intel only — GUID: mwh1416946836202
Ixiasoft
Visible to Intel only — GUID: mwh1416946836202
Ixiasoft
7.7.6.2. Writing a New Ethernet Device Driver
The easiest way to write a new Ethernet device driver is to start with Altera’s implementation for the Standard Microsystems Corporation (SMSC) lan91c111 device, and modify it to suit your Ethernet media access controller (MAC). This section assumes you take this approach. Starting from a known working example makes it easier for you to learn the most important details of the NicheStack TCP/IP Stack implementation.
The source code for the LAN91C111 10/100 Non-PCI Ethernet Single Chip MAC + PHY driver is provided with the Quartus Prime software.. For the sake of brevity, this section refers to this directory as <SMSC path>. The source files are in the <SMSC path> /src/iniche and <SMSC path> /inc/iniche directories.
A number of useful NicheStack TCP/IP Stack files are installed with the Nios II Embedded Design Suite (EDS), under the <Nios II EDS install path> /components/altera_iniche/UCOSII directory. For the sake of brevity, this chapter refers to this directory as <iniche path>.
For more information about the NicheStack TCP/IP Stack implementation, refer to the NicheStack Technical Reference Manual, available on the Intel FPGA website.
You need not edit the NicheStack TCP/IP Stack source code to implement a NicheStack-compatible driver because the source code is provided for your reference. The files are installed with the Nios II EDS in the <iniche path> directory. The Ethernet device driver interface is defined in <iniche path> /inc/alt_iniche_dev.h.