Using Xilinx platform studio tool suite, BSP can be generated quickly and conveniently for virtex FPGA with embedded PowerPC processor.

The platform FPGA with embedded processor provides great flexibility, integration and high performance. At present, it is possible to develop extremely complex and highly customized embedded systems in a single programmable logic device. With the increase of chip performance, how to make the design method always efficient and productive has become a major challenge. One of the key activities of embedded system development is board level support package (BSP). With BSP, the embedded software application can be initialized successfully and communicate with the hardware resources connected to the processor. Typical BSP components include boot code, device driver code and initialization code.

What are the latest developments in embedded processors

Creating BSP is a long and complicated process, and it has to be created again whenever the combination of microprocessor, processor and related peripherals changes. For FPGA, the short design cycle and the flexibility of the platform will make the task of managing BSP more difficult (Figure 1). This forces people to find a more effective way to manage BSP.

Design process and software BSP generation

The design of Xilinx processor includes hardware platform assembly process and embedded software development process. These processes are managed through the XPS (Xilinx platform studio) tool, which is part of the Xilinx embedded development kit (EDK).

Design usually begins with assembling and configuring processors and devices connected to them in XPS. After defining the hardware platform, you can configure the software parameters of the system. One of the main features of XPS is that it can customize BSP according to your choice and configuration of processors, peripherals and embedded operating systems. The system develops through the iterative change of hardware design, and BSP develops with the platform.

The automatically generated BSP can endow embedded system designers with the following abilities: automatically creating BSP which is completely matched with hardware design; Pre certified components are used to eliminate BSP design errors; Start application software development immediately to improve the efficiency of designers.

Creating BSP for VxWorks

XPS can generate customized tornado 2.0. X (vxworks5.4) or tornado 2.2. X (vxworks5.5) BSPs for PowerPC 405 processors and peripherals in Xilinx virtex II pro and virtex-4 FPGA. The generated BSP contains all necessary supporting software, including boot code, device driver and VxWorks initialization.

After XPS defines the hardware system with PowerPC 405 processor, it only needs to follow the following three steps to generate the BSP for VxWorks

1. Use the software settings dialog box to select the operating system to be used for the system. XPS users can choose VxWorks 5.4 or VxWorks 5.5 as their target operating system.

2. After selecting the operating system, you can go to the database / operating system parameter tab and adjust the tornado BSP according to the customized hardware. You can select any UART device in the system as the standard I / O device (standard input and standard output). This will enable the device to be used as a VxWorks control device.

You can also choose which peripherals to use as connecting peripherals and which devices to tightly integrate into the VxWorks operating system. For example, the Xilinx 10 / 100 Ethernet MAC can be integrated into the VxWorks enhanced network driver (end) interface. Or you don’t need to connect the Ethernet device to the end interface, but directly access it from the VxWorks application.

3. Select “tools generation library” and BSP menu options to generate tornado BSP. The generated BSP is similar to the traditional tornado BSP, located in ppc405_ 0/bsp_ ppc405_ 0 (see Figure 2). Pay attention to ppc405_ 0 is the instance name of PowerPC 405 processor in hardware design. XPS users can specify other instance names, and the subdirectory names of BSP will match the processor instance names.

Tornado BSP generated by XPS has a “makefile”. If you want to use diab compiler instead of GNU compiler, you can modify this file at the command line.

Tornado BSP is completely independent and can be transferred to other directory locations, such as the standard tornado installation directory of BSP: target / config.

Custom BSP

The BSP generated by XPS for VxWorks is similar to most other tornado BSPs, except that the location of the driver code is different. The ready-made device driver code related to tornado is usually located in target / SRC / DRV directory of tornado distribution directory, while the device driver code of BSP automatically generated by XPS is located in BSP directory itself.

The dynamic characteristic of embedded system based on FPGA is the reason for this small difference. Because the embedded system based on FPGA can be reprogrammed with new or changed IP, the device driver can be changed, so it is necessary to place the device driver source file more dynamically. Figure 2 shows the automatically generated BSP directory tree, and the Xilinx device driver is placed in the BSP subdirectory ppc405_ 0_ drv_ CSP / xsrc.

The Xilinx device driver is executed in C disk and distributed in several source files, which is different from the traditional VxWorks driver, which is usually composed of a single C header file and an executable file. In addition, for device drivers, there are not only the execution independent of the operating system, but also the optional execution dependent on the operating system.

Operating system of driver?? The riser should be used with any operating system or processor. It provides an application program interface (API), which can extract the function of basic hardware. The subsidiary part of the operating system of the driver adjusts the driver so that it can be used in the operating system such as VxWorks, such as serial IO driver for serial port and end driver for Ethernet controller. Only drivers that can be tightly integrated into the standard operating system interface require operating system dependent drivers.

The way to add VxWorks image component to Xilinx driver source file is the same as other BSP files. For each driver, there is one named ppc405 in the BSP directory_ 0_ drv_. C. This file includes the driver source file for a given device (* c) and is automatically compiled by BSP makefile.

This process is similar to that of VxWorks syslib. C for Wind River system. Unlike other drivers, Xilinx driver files are only included in syslib. C because of the conflict of namespace and maintainability. If all Xilinx driver files are part of a single compilation unit, then static functions and data are no longer confidential. This will limit the device driver and offset its operating system?? It’s the nature.

Integration with tornado IDE

The automatically generated BSP is integrated into the tornado ide. BSP can be compiled from the command line using the tornado make tool or from the tornado project. After generating BSP, just type “make VxWorks” on the command line to compile bootable ram image. It is assumed that the tornado environment has been set before (this setting can be done on the windows operating platform by using host / x86-win32 / bin / torvars. Bat on the command line). If you are using the “tornado project” device, you can create a project based on the newly generated BSP, and then use the component environment provided by ide to compile the BSP.

Tornado 2.2. X supports not only GNU compiler, but also diab compiler. Tornado BSP created by XPS has a “makefile”. If you want to use diab compiler instead of GNU compiler, you can modify this “makefile” on the command line. Look for a build variable called a tool and set the value to diab instead of GNU. If you use the tornado project tool, you can choose the compiler you want when the project is initially created.

File “50ppc405″_ 0. CDF “is located in the BSP directory and changed during the creation of the BSP. This file integrates device driver into tornado ide menu system. The driver is combined with BSP in the “hardware peripheral devices” subfolder. Below it is a separate device driver folder.

The Files tab of the tornado project facility also shows the number of files used to combine the Xilinx device driver with the tornado build process. These files are created automatically by XPS, you just need to know that they exist.

Some commonly used devices are closely integrated with the operating system, while other devices can be downloaded from the application program by directly using the device driver?? Ask. The device drivers closely combined with VxWorks include: 10 / 100 Ethernet MAC; 10 / 100 Ethernet Lite MAC; 1GB Ethernet MAC; 16550/16? 50 UART; UART Lite; Interrupt controller; System ace technology; PCIe。

All other devices and related device drivers are not tightly integrated into VxWorks interface, but loosely integrated with it. These devices can be accessed by directly accessing the device drivers from the user application.

Summary of this paper

With the increasing popularity and wide application of FPGA based on embedded processor, the tool solutions that can effectively organize the hardware and software processes come into being, which play a key role in helping designers keep up with the progress of chips.

Xilinx users have always recognized XPS and its integration with VxWorks 5.4 and 5.5. Xilinx will continue to support the development of the Wind River process, which will soon include support for VxWorks 6.0 and workbench ide.

Source: China electronic network

Leave a Reply

Your email address will not be published. Required fields are marked *