Gigabit Ethernet Communication Based on FPGA-on-chip PowerPC in VxWorks

Publisher:BlissfulHeartLatest update time:2010-12-31 Source: AETKeywords:VxWorks Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

At present, SoC is developing towards a smaller area and higher speed. 100M network communication can no longer meet people's production and work needs. Gigabit network communication has become an urgent requirement in work. There are two modes to choose from to achieve Gigabit network communication with FPGA. One is to write an IP soft core, and the other is to use the MAC core embedded in FPGA. Method 1 is flexible, but it is not easy to implement. Therefore, Xilinx classifies it as a paid IP; the three-state configurable characteristics of MAC in method 2 make it possible for us to achieve Gigabit network communication. This article is based on this embedded Ethernet MAC module and successfully implements Gigabit network communication under the VxWorks operating system.

1 Gigabit communication hardcore architecture embedded in Virtex4 FX series FPGA

Virtex4 FX series FPGAs have multiple hard cores embedded for Gigabit communication. For example, XC4VFX20 connects two EMAC cores through a host interface. The two EMACs can be used together or only one of them can be used.

The Ethernet MAC hard core embedded in Virtex4 has the following features:

Supports half-duplex and/or full-duplex operation

Designed to comply with IEEE 802.3-2002 standards

Supports 3 different operation modes: 1 Gbps, 100 Mbps, 10Mbp

Support MII, GMII, RGMII, SGMII communication methods

Provide technical support for VLAN frames and JUMBO frames of unlimited length

Provides optional network management features including per-packet statistics vectoring and flow control

The TEMAC core can be configured and monitored through a processor-independent interface, providing users with additional flexibility in selecting the ideal processor for their application.

In 1Gigabit mode, TEMAC supports Gigabit Media Independent Interface (GMII) and Reduced Gigabit Media Independent Interface (RGMII). GMII is a byte-wide parallel SDR interface running at 125 MHz, while RGMII is a half-byte parallel DDR interface running at 25 MHz, providing a total bandwidth of 1 Gbps. In addition, TEMAC supports MII interface in both 100 and 10 Mbps modes. MII interface is 4-bit wide and operates at 25 MHz in 100MBps mode. In 10MBps mode, MII interface operates at 2.5MHz.

Since the Ethernet MAC hard core is embedded in Virtex4 and PowerPC is also embedded in the FX series, PowerPC can be used to control Ethernet MAC to achieve Gigabit network communication.

2 BSP Porting under VxWorks

The VxWorks operating system is an embedded real-time operating system (RTOS) designed and developed by the American WindRiver Company in 1983. It adopts a microkernel structure, supports multiple processors, has rich network protocols, good compatibility and scalability, and has the function of dynamic linking and downloading programs. Since its launch in the 1980s, it has gradually occupied a place in the field of embedded real-time operating systems with its continuously launched upgraded versions, high-performance kernel and user-friendly development environment, and has become famous for its successful application in high-tech products such as Mars Exploration Rovers and Patriot Missiles. The board support package BSP (Board Support Package) of VxWorks is a low-level software development package between the underlying hardware and the upper-level software. Its main function is to shield the hardware and provide the operating system driver. The specific functions include:

1) Single board hardware initialization, mainly CPU initialization, provides underlying hardware support for the entire software system;

2) Provide device drivers and system interrupt service routines for the operating system;

3) Customize the operating system functions to provide a real-time multi-tasking operating environment for the software system;

4) Initialize the operating system and prepare for the normal operation of the operating system. [page]

In embedded system design, BSP development is a very complex and tedious task. The EDK suite provided by Xilinx can greatly reduce the work of developers. The BSP generator (BSPgen) in EDK can automatically generate user-customizable BSPs based on different microprocessors, peripherals, and RTOS combinations. It contains the necessary support software for the system, including Boot code, device drivers, and RTOS initialization. BSPgen can be used to package Xilinx device drivers into a subdirectory of the BSP, and seamlessly integrate Xilinx device drivers with VxWorks and its Tornado integrated development environment, fully reducing the development cycle.

However, the BSP generated by BSPgen is only a fixed BSP template, which cannot correctly reflect the memory mapping of RAM/ROM and does not support the kernel/driver customized by the user through the BSPgen process. Therefore, the BSP generated by BSPgen needs to be modified and tailored.

For BSP developers, with the help of EDK's BSPgen, it is also necessary to do the following tasks:

1) Modify the RAM, ROM address and serial port rate in config.h and Makefile

2) Modify sysSerial.c and set the serial port correctly

3) Add driver files for devices that cannot be seamlessly integrated with VxWorks

4) Configure Ethernet parameters in sysNet.c and set the MAC address

5) Disable or enable Cache according to the configuration in EDK

6) Modify sysLib.c to display the correct information

7) Set the host IP address

After the above modifications, place the new BSP in the Tornado installation directory Tornado_roottargetconfig. Based on this BSP, generate a new VxWorks project in the Tornado integrated environment, and then you can carry out general embedded operating system development.

The address mapping of RAM and ROM in EDK is shown in the following table:

Table 1 RAM/ROM address mapping

Modify the addresses in makefile and config.h according to Table 1. The MAC address of the network is defined in sysNet.c by the following statement, which must be modified according to the actual MAC address, such as the MAC address in this article: 00:0A:35:01:88:25

static char XEmacMacAddr0[6] = { 0x6, 0x5, 0x4, 0x3, 0x2, 0x1 }; //Before modification

static char XEmacMacAddr0[6] = { 0x00, 0x0A, 0x35, 0x01, 0x88, 0x25 }; //After modification

sysSerial.c initializes the serial port. Since the serial port ID must be correctly specified, sysLib.c can display the information of the vxWorks image, so corresponding modifications must also be made.

After modifying the BSP generated under EDK and generating the correct VxWorks image in the Tornado integrated environment, it can be downloaded to the FPGA. Observe whether the serial port output is correct and perform corresponding debugging to confirm that the BSP transplantation is correct.

Keywords:VxWorks Reference address:Gigabit Ethernet Communication Based on FPGA-on-chip PowerPC in VxWorks

Previous article:Development of Electronic Systems Based on SoPC Builder
Next article:Oscillator application based on the inverter inside CPLD

Recommended ReadingLatest update time:2024-11-17 00:19

The Difference Between FPGA Design and DSP Design
  Q1: What is the biggest difference between FPGA design and DSP design?   A1: This question needs to be viewed from multiple perspectives. They are all used to implement a certain function in hardware circuits, but their emphases are different. Let me talk about what is covered here.    1) Internal resources   FP
[Embedded]
OnePlus Nord 2 CE will be released no earlier than February, expected to be equipped with Dimensity 900 SoC
       The OnePlus Nord 2 CE phone was previously exposed and has passed the BIS certification this month. Its model number is "IV2201". According to mspoweruser, a whistleblower said on Twitter that this phone will not be released before February 2022 and is expected to be launched in India first.   Earlier news said
[Mobile phone portable]
Color recognition system based on FPGA and color sensitive sensor 2
4 Digital part The core of this design is the digital part, and the system is built based on Altera's NiosII processor. After filtering, the voltage signal is transmitted to the A/D converter, and the digital signal is obtained through A/D conversion, which is ready for the digital part to identify and pro
[Analog Electronics]
Color recognition system based on FPGA and color sensitive sensor 2
Apple's A14 and A15 Bionic, Apple's game-changing SoC solutions
Lyon, France - December 16, 2021 | "Apple's A14 Bionic, fully dedicated to the iPhone 12 series and iPad, came out in 2020 at the right time," said Ying-Wu Liu, technology and cost analyst at System Plus Consulting. "Apple's A15 Bionic followed closely behind, offering multiple advantages for the iPhone 13 and iPad
[Mobile phone portable]
Implementation of High-Speed ​​Clock Data Recovery Circuit Based on FPGA
0 Introduction The clock data recovery circuit is the core module of the high-speed transceiver, and the high-speed transceiver is a key part of the communication system. With the application of optical fiber in communication, the communication rate that the channel can carry can reach GHz, making the recei
[Embedded]
Implementation of High-Speed ​​Clock Data Recovery Circuit Based on FPGA
1.02 million! Android's most powerful SoC network running score exposed: This big manufacturer is going to use
      Not long ago, Qualcomm China announced that it will hold the Snapdragon Technology Summit on December 1, when the new generation of Snapdragon mobile platform will be officially released.   It was previously reported that Qualcomm's new generation of mobile platform will adopt the new naming of Snapdragon 8 Gen1
[Mobile phone portable]
1.02 million! Android's most powerful SoC network running score exposed: This big manufacturer is going to use
Using AVR microcontroller to configure FPGA
Altera's ACEX, FLEX and other series of FPGA chips are widely used, but their FPGAs are based on SRAM structures, and the programming data that determines the logic functions of the circuits is stored in the SRAM. Due to the volatility of SRAM, the programming data must be reloaded into SRAM every time the power is
[Microcontroller]
Using AVR microcontroller to configure FPGA
FPGA configuration solution for large-capacity serial e-Flash
Introduction   Field Programmable Gate Array FPGA (Field Programmable Gate Array) is a field programmable ASIC that combines many advantages such as strong versatility, flexible design, high integration and convenient programming. Since Xilinx in the United States launched FPGA products in 1985 and achieved success, F
[Embedded]
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号