LCD Display Inverter

Display Inverter / VGA Board / LCD Controller

Use XPS tool to quickly generate Virtex FPGA board support package

Platform FPGAs with embedded processors provide you with unprecedented flexibility, integration and high performance. At present, it has become possible to develop extremely complex and highly customized embedded systems in a single programmable logic device.

With the continuous increase of chip performance, how to make the design method always efficient and productive has become a major challenge faced by people. One of the key activities of embedded system development is the development board support package (BSP). With BSP, embedded software applications can be successfully initialized and communicate with hardware resources connected to the processor. Typical BSP components include boot code, device driver code, and initialization code.

Creating a BSP is a lengthy and tedious process, and it has to be repeated every time there is a change in the microprocessor complex (processor and related peripherals). For FPGAs, the rapid design cycle coupled with the flexibility of the platform will make the task of managing the BSP more difficult (Figure 1). This situation forces people to find ways to manage BSP more effectively.

This article will describe an innovative solution provided by Xilinx that can simplify the creation and management of RTOS BSPs. We chose the WindRiver VxWorks process to clarify this concept, but the technology behind it is generic and applicable to all other operating system solutions that support Xilinx® processors.

Traditional embedded platform

platform FPGA

OPB Arbiter

Low-speed peripherals

Custom peripherals

PLB-OPB bridging

Different from

PLB Arbiter

Storage controller

High-speed peripherals

Fixed peripherals

Fixed address mapping

fixed BSP

Design-based peripherals

Each board is a unique customized product

Need to create efficient customization BSP

Figure 1-Platform FPGA flexibility requires high efficiency in the software BSP generation process
Xilinx design flow and software BSP generation

The design of Xilinx processors includes a hardware platform assembly process and an embedded software development process. These processes are managed through the Xilinx Platform Studio (XPS) tool, which is part of the Xilinx Embedded Development Kit (EDK).

The design usually starts with assembling and configuring the processor and the accessories connected to it in the XPS. After the hardware platform is defined, the software parameters of the system can be configured.

One of the main features of Platform Studio is that it can customize the BSP according to your choice and configuration of the processor, peripherals, and embedded operating system. The system develops through the iterative changes of the hardware design, and at the same time, the BSP develops with the platform.

The automatically generated BSP can give embedded system designers the following capabilities:

  • Automatically create a BSP that exactly matches the hardware design
  • Eliminate BSP design errors with pre-certified components
  • Start application software development immediately to increase the designer’s output

Create BSP for WindRiver VxWorks

Platform Studio can generate customized Tornado 2.0.x (VxWorks 5.4) or Tornado 2.2.x (VxWorks 5.5) BSPs for the PowerPC™ 405 processor and its peripherals in Xilinx Virtex™-II Pro and Virtex-4 FPGAs. The generated BSP contains all necessary support software for the system, including: boot code, device drivers and VxWorks initialization.

After Platform Studio has defined the hardware system with PowerPC 405 processor, just follow the following three steps to generate the BSP for VxWorks:

  • Use the software settings dialog box (see Figure 2) to select the operating system to be used for the system. Platform Studio users can choose vxworks5_4 or vxworks5_5 as their target operating system.
  • After selecting the operating system, you can go to the library/operating system parameter tab (as shown in Figure 3) and adjust the Tornado BSP according to the customized hardware. You can select any UART device in the system as standard I/O devices (standard input and standard output). This will enable the device to be used as a VxWorks console device.
    You can also choose which peripherals are used as connected peripherals and which devices are tightly integrated into the VxWorks operating system. For example, Xilinx 10/100 Ethernet MAC can be integrated into VxWorks Enhanced Network Driver (END) interface. Or, it is not necessary to connect the Ethernet device to the END interface, and access it directly from the VxWorks application.
  • Select “Tools> Generate Database” and the BSP menu option to generate Tornado BSP. The generated BSP is similar to the traditional Tornado BSP and is located in the Platform Studio project directory under ppc405_0/bsp_ppc405_0 (see Figure 4).

    Figure 2-Setting to select embedded operating system

    Figure 3-Configure the parameters of a specific operating system

Figure 4-The generated BSP directory structure

The Tornado BSP generated by Platform Studio has a Makefile. If you want to use the Diab compiler instead of the Gnu compiler, you can modify this file on 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 details

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

Figure 5-Tornado 2.x project: VxWorks tab

The dynamic characteristics of FPGA-based embedded systems are responsible for this slight difference. Because FPGA-based embedded systems can be reprogrammed with new or changed IP, and device drivers can be changed, it is necessary to place device driver source files more dynamically. Table 4 shows the directory tree of the automatically generated BSP. The Xilinx device driver is placed in the BSP subdirectory ppc405_0_drv_csp/xsrc.

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

The operating system independent part of the driver should be used with any operating system or processor. It provides an application programming interface (API) that can extract the functions of the basic hardware. The operating system accessory part of the driver adjusts the driver so that it can be used under operating systems such as VxWorks. Examples are the Serial IO driver used by the serial port and the END driver used by the Ethernet controller. Only drivers that can be tightly integrated into the standard operating system interface require operating system accessory drivers.

The Xilinx driver source file is added to the VxWorks image component in the same way as other BSP files are added. For each driver, there is a file named ppc405_0_drv_ in the BSP directory.c files. This file includes the driver source files (*.c) for a given device and is automatically compiled by the BSP makefile.

The process is similar to the process of incorporating VxWorks sysLib.c into the source file for the Wind River-supplied driver. The reason why Xilinx driver files are not simply included in sysLib.c like other drivers is because of namespace conflicts and maintainability issues. If all Xilinx driver files are part of a single compilation unit, then static functions and data will no longer be kept secret. This puts restrictions on the device driver and offsets its operating system independence.

Table 6-Tornado 2.x Project: File Tab

Integration with Tornado IDE

The automatically generated BSP is integrated into Tornado IDE (Project Device). The BSP can be compiled from the command line using the Tornado make tool, or compiled from the Tornado Project. After generating the BSP, just type make vxWorks on the command line to compile the bootable RAM image. This assumes that the Tornado environment has been set up before (this setting can be done by using host/x86-win32/bin/torVars.bat on the command line on the Windows operating platform). 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 the IDE to compile this BSP.

Tornado 2.2.x not only supports the gnu compiler, but also the diab compiler. The Tornado BSP created by Platform Studio has a makefile. If you want to use the diab compiler instead of the gnu compiler, you can modify this makefile on the command line. Look for the build variable called “tool” and set the value to “diab” instead of “gnu”. If you use the Tornado Project tool, you can select the compiler you need when the project is first created.

The file 50ppc405_0.cdf is located in the BSP directory and was changed during the process of creating the BSP. This file incorporates the device driver into the Tornado IDE menu system. The driver is combined with the BSP in the “Hardware> Peripheral Devices” subfolder. Below it is a separate device driver folder. Figure 5 shows a menu with Xilinx device drivers.

The “Files” tab of the Tornado Project Facility also displays the number of files used to integrate the Xilinx device driver with the Tornado build process. These files are automatically created by Platform Studio, you just need to know their existence. Figure 6 shows an example of a driver build file.

Some commonly used devices are tightly integrated with the operating system, while other devices can be accessed from applications by directly using device drivers. Device drivers closely integrated with VxWorks include:

  • 10/100 Ethernet MAC
  • 10/100 Ethernet Lite MAC
  • 1 Gigabit Ethernet MAC
  • 16550/16450 UART
  • UART Lite
  • Interrupt controller
  • System ACE™ technology
  • PCIe

All other devices and related device drivers are not tightly integrated into the VxWorks interface, but only loosely integrated with it. Access to these devices can be done by directly accessing the relevant device driver from the user application.

Concluding remarks

As FPGAs based on embedded processors are becoming more popular and widely used, tool solutions that can effectively organize hardware and software processes come into being, which play a key role in helping designers keep up with the progress of chips. effect.

Xilinx users have always appreciated Platform Studio 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.

Author: Rick Moleres Software IP Manager [email protected]

Milan Saini Technical Marketing Manager [email protected] Xilinx

The Links:   SX25S004 TM121SV-02L07D