HAN Pilot Platform
Demonstration Manual
36
www.terasic.com
September 6, 2019
logic automatically. In this following section we will describe the steps to create the Simple Socket
Server using Nios II. We create a new project in Nios II using the project template, Simple Socket
Server shown in
. The PTF file created using the SOPC builder in Quartus II is used in
the Select Target Hardware section.
Figure 2-36 Nios II project simple socket server
Overview
The Simple Socket Server uses the industry standard sockets interface to TCP/IP. It uses DHCP
protocol to requests a valid IP from the Gateway. During the device initialization process, the
NichStack TCP/IP Stack system code calls get_mac_add() and get_ip_add() to get the MAC and IP
addresses for the network interface. Once the MAC address is generated, auto-negotiation is
initiated where both connected devices, the Ethernet (Marvel 88E1111) and Gateway devices
broadcasts its transmission parameters, speed and duplex mode. By default, the MAC interface for
the Ethernet device is set to SGMII. In this demonstration, we are using SGMII MAC interface
which can be configured through the management interface of the 88E1111 Ethernet device. Once
the link is established an IP address is assigned to the Ethernet device along with the port number.
Through TCP and port number, the demonstration uses Telnet client to establish connection with the
Simple Socket Server, where it is continuously listening on the port. Once the connection is
established between the Telnet client and Simple Socket Server, the Telnet client is able to send
packets which are received by the Nios II processor and through the Simple Socket Server it will
send server command to the HAN Pilot Platform. The packet sent contains LED command which is
extracted and dispatched to the LED command queue for processing by the LED management tasks.
shows the software architecture of the Nios program for the Simple Socket Server. The
top block containing the Nios II processor and the necessary hardware to be implemented into the
HAN Pilot Platform. The software device drivers contain the necessary device drivers needed for
Ethernet and other hardware components to functions. The HAL API block provides the interface
Содержание HAN Pilot Platform
Страница 1: ......
Страница 92: ...HAN Pilot Platform Demonstration Manual 91 www terasic com September 6 2019...