DECA User Manual
105
www.terasic.com
May 22, 2015
After the Qsys hardware project has been built, develop the Qsys software project, whose basic
architecture is shown in
Figure 7-14
. The top block contains the Nios II processor and the
necessary hardware to be implemented into the DECA board. The software device drivers contain
the necessary device drivers needed for the Ethernet and other hardware components to work. The
HAL API block provides the interface for the software device drivers, while the Micro C/OS-II
provides communication services to the NicheStack™ and Socket Server. The NicheStack™
TCP/IP Stack software block provides networking services to the application block where it
contains the tasks for Socket Server.
Figure 7-14 Nios II Software Routine Architecture
Finally, the detail descriptions for Software flow chart of the Socket Server program are listed in
below:
Firstly, the Socket Server program initiates the MAC and net device then calls the get_mac_addr()
function to set the MAC addresses for the PHY. Secondly, it initiates the auto-negotiation process to
check the link between PHY and gateway device. If the link exists, the PHY and gateway devices
will broadcast their transmission parameters, speed, and duplex mode. After the auto-negotiation
process has finished, it will establish the link. Thirdly, the Socket Server program will prepare the
transmitting and receiving path for the link. If the path is created successfully, it will call the