Nios II Classic Software Developer’s Handbook

ID 683282
Date 5/14/2015
Public
Document Table of Contents

11.4.2. The NicheStack TCP/IP Stack Tasks

The NicheStack TCP/IP Stack, in its standard Nios II configuration, consists of two fundamental tasks. Each of these tasks consumes a MicroC/OS-II thread resource, along with some memory for the thread's stack. In addition to the tasks your program creates, the following tasks run continuously:
  • The NicheStack main task, tk_netmain()—After initialization, this task sleeps until a new packet is available for processing. Packets are received by an interrupt service routine (ISR). When the ISR receives a packet, it places it in the receive queue, and wakes up the main task.
  • The NicheStack tick task, tk_nettick()—This task wakes up periodically to monitor for time-out conditions.

These tasks are started when the initialization process succeeds in the netmain() function.

Note: You can modify the task priority and stack sizes using #define statements in the configuration file ipport.h. You can create additional system tasks by enabling other options in the NicheStack TCP/IP Stack by editing ipport.h.