Specifications
Related Information
• Overview of Nios II Embedded Development
For more information about the Nios II Embedded Design Suite (EDS).
• MicroC/OS-II Real-Time Operating System
For more information about MicroC/OS-II.
• Using MicroC/OS-II RTOS with the Nios II Processor Tutorial
For more information about MicroC/OS-II and a Nios II processor tutorial.
Introduction to the NicheStack TCP/IP Stack - Nios II Edition
Altera provides the Nios II implementation of the NicheStack TCP/IP Stack, including source code, in the
Nios II EDS. The NicheStack TCP/IP Stack provides you with immediate access to a stack for Ethernet
connectivity for the Nios II processor. Altera's implementation of the NicheStack TCP/IP Stack includes
an API wrapper, providing the standard, well documented socket API.
The NicheStack TCP/IP Stack uses the MicroC/OS-II RTOS multithreaded environment. Therefore, to
use the NicheStack TCP/IP Stack with the Nios II EDS, you must base your C/C++ project on the
MicroC/OS-II RTOS. The Nios II processor system must also contain an Ethernet interface, or media
access control (MAC). The Altera-provided NicheStack TCP/IP Stack includes driver support for the
following two MACs:
• The SMSC LAN91C111 device
• The Altera Triple Speed Ethernet MegaCore
®
function
The Nios II Embedded Design Suite includes hardware for both MACs. The NicheStack TCP/IP Stack
driver is interrupt-based, so you must ensure that interrupts for the Ethernet component are connected.
Altera's implementation of the NicheStack TCP/IP Stack is based on the hardware abstraction layer
(HAL) generic Ethernet device model. In the generic device model, you can write a new driver to support
any target Ethernet MAC, and maintain the consistent HAL and sockets API to access the hardware.
Related Information
Developing Device Drivers for the Hardware Abstraction Layer on page 7-1
For more information about writing an Ethernet device driver.
The NicheStack TCP/IP Stack Files and Directories
Altera provides the source code for your reference. By default the files are installed with the Nios II EDS
in 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>. You need not edit the NicheStack TCP/IP Stack source
code to use the stack in a Nios II C/C++ program.
Under <iniche path>, the original code is maintained; as much as possible; under the <iniche path>
directory. This organization facilitates upgrading to more recent versions of the NicheStack TCP/IP Stack.
The directory contains the original NicheStack TCP/IP Stack source code and documentation specific to
the Nios II implementation of the NicheStack TCP/IP Stack, including source code supporting
MicroC/OS-II.
Altera's implementation of the NicheStack TCP/IP Stack is based on version 3.1 of the protocol stack,
with wrappers around the code to integrate it with the HAL.
11-2
Introduction to the NicheStack TCP/IP Stack - Nios II Edition
NII5V2
2015.05.14
Altera Corporation
Ethernet and the NicheStack TCP/IP Stack - Nios II Edition
Send Feedback