Figure 1. A heterogeneous architecture combines a processor, FPGA, and I/O with high-level programming tools.
The Intel processor runs NI Linux Real-Time, a real-time OS based on a standard kernel and designed specifically for reliable and deterministic operation in long-term deployments. It includes standard Linux features such as native support for Security-Enhanced Linux. The NI-DAQmx driver provides a single programming interface for acquiring waveforms and programming analog input, analog output, digital I/O, counters, and control.
The user programmable FPGA allows you to offload time-critical processes for advanced control, signal-processing, filtering, advanced timing, and other logic. NI uses the latest FPGA technology from Xilinx, with chips that contain up to 326, 060 logic cells, and 840 DSP slices.
While heterogeneous architectures that combine a processor and FPGA are extremely valuable for advanced and critical applications, programming such systems is a challenge. Challenges exist at every stage and include choosing or building the operating system, developing drivers to talk with I/O, and communicating between processor and FPGA, as well as finding the expertise needed to write FPGA programs and keep the development cycles of both targets in sync throughout the project.
NI addresses the challenges of heterogeneous software design by delivering a pre-validated software stack and high-level programming tools that you can build on, while maintaining openness and portability to future platforms. The architecture provides fully tested middleware, drivers, and a Linux OS out of the box so you can quickly port your application code to the NI platform. Continue to use your preferred application development tools and leverage the strengths of LabVIEW for real-time and FPGA programming. The true value of LabVIEW FPGA programming is that this abstracted approach to digital design empowers application-level C/C++ developers to implement the most critical portions of their applications in hardware, which they may never have done otherwise without having VHDL experts on staff.
Figure 2. Program the embedded processor with LabVIEW or any Linux compatible tools and use the NI RIO driver to communicate with LabVIEW FPGA.
Embedded system designers working with NI hardware can choose from a variety of programming languages and tools when architecting their systems. Developers can program the open embedded processor with LabVIEW, C/C++, or textual math and can reuse source code from past projects to save development time. Programmers can reuse C/C++ libraries from past projects by calling them from within a LabVIEW Real-Time application, which simplifies tasks like real-time thread scheduling. Alternatively, developers can develop, debug, and deploy applications to the embedded processor written entirely in C or C++ using Eclipse or another preferred integrated development environment (IDE).
Introducing FPGAs into embedded system design makes it possible to create high-performance digital logic without the need for custom ASIC design. Traditionally, text-based hardware description languages such as VHDL or Verilog written by digital design engineers, have been used for FPGA development. Unfortunately, due to challenging language semantics, these hardware description languages make it difficult to take advantage of the full capabilities of FPGA design. This is evidenced by the embedded industry’s quest to find higher level abstractions for FPGA design, such as C-to-gates tools, or graphical programming languages such as G in LabVIEW FPGA.
The LabVIEW graphical programming environment abstracts the complexity of FPGA hardware and delivers programming constructs familiar to software engineers so users can design high-performance embedded systems faster.
Since NI hardware runs a standard Linux OS, you can build your embedded application using any Linux-compatible tools. This gives you the flexibility to reuse your IP, expertise, and development tools, but you need to understand where and how these can integrate with LabVIEW Real-Time and LabVIEW FPGA.
Figure 3. Choose a software design pattern based on IP reuse and real-time programming expertise.
You must use LabVIEW FPGA to program the Xilinx FPGA, but you can use either C/C++ or LabVIEW Real-Time to communicate with the LabVIEW FPGA program. There is both a C API and a LabVIEW API for the communication layer between the processor application and the LabVIEW FPGA program. Thus, the first step in designing your NI Linux Real-Time system is to choose a top-level software design pattern.
Choosing LabVIEW to program the real-time application has many advantages in that LabVIEW Real-Time includes built-in constructs for multithreading, real-time thread scheduling, and many other features specific to building robust, deterministic code. In addition, LabVIEW can interface with shared libraries and applications written in other languages so that this valuable IP can be reused in the LabVIEW Real-Time design pattern.
However, in cases when the top-level application must be written solely in C/C++, you can use LabVIEW only for programming the I/O in the FPGA, and evaluate which critical tasks should be moved to execute in hardware instead of on the processor.
Resources to Get Started
Software Toolchains Required
LabVIEW is distinctly suited for FPGA programming because it clearly represents parallelism and data flow. With LabVIEW FPGA, engineers and scientists with C expertise can take advantage of FPGAs within their designs without the burden of learning hardware design. In addition, the FPGA Interface C API delivers a communication layer between the FPGA and real-time application for I/O control and data streaming. With this API, you can use LabVIEW graphical tools to program the FPGA and choose either LabVIEW or C/C++ tools to program the processor within the system.
LabVIEW FPGA helps you create custom measurement and control hardware without low-level hardware description languages or board-level design. You can use this custom hardware for unique timing and triggering routines, ultra-high-speed control, interfacing to digital protocols, digital signal processing, and many other applications requiring high-speed hardware reliability and tight determinism.