MATLAB® and Simulink® from MathWorks® are now widely spread in the scientific and engineering communities. Even at Universities, students are initiated early to this software, since it provides powerful processing capabilities and is useful in studying physical phenomena, explaining and simulating the behaviors of complex systems, developing algorithms, acquiring and processing data, and more.
You probably already know that Simulink is often used for software simulation of real-life models and the development of software algorithms, but did you know that it also provides an efficient environment for the development of FPGA firmware, allowing you to develop practical applications with hardware equipment in the loop?
This blog post describes the benefits of Simulink, Xilinx® System Generator for DSP™, and Nutaq’s MBDK, and explains how they are integrated under Simulink in an all-in-one, FPGA-based DAQ system development environment.
Simulink: A Great Development Environment for Data Acquisition Systems
Simulink is a powerful application that is really appropriate for data acquisition (DAQ) system development. First of all, Simulink stands out for its ease of use. Its graphical or model-based programming approach, enhanced with an extensive library, including tons of pre-built processing and conditioning blocks, helps you quickly create both simple and complex proof-of-concept applications or algorithms in a fraction of the time it takes with traditional programming languages (C, C++ or Java, for example).
Furthermore, software package and add-ons can be imported into Simulink to create an interesting all-in-one development environment that allows the DAQ system developer to:
- implement hardware FPGA-based pre-processing applications using Xilinx System Generator for DSP blocksets
- interface the FPGA design with the hardware of your DAQ system using Nutaq MBDK blocksets
- implement host software signal post-processing using Simulink DSP libraries
- simulate and validate both FPGA and host signal processing algorithms
- manage and save the acquired data
- generate reports
- create a graphical user interface (GUI) to display or post-analyze the acquired data
- do more too!
The following diagram depicts the software architecture:
Develop FPGA-based Processing Applications Using Xilinx System Generator for DSP
Xilinx System Generator for DSP also includes graphical blocksets that are integrated as a library in Simulink. Whereas Simulink is designed for software digital signal processing and simulation development, System Generator is designed for Xilinx FPGA (for example, Virtex-6) signal processing application development.
Actually, high-performance digital signal processing FPGA applications can easily be designed and implemented by connecting the different blocks available in the Xilinx blockset. In other words, you can develop your FPGA-based DAQ system with the same method you use to develop models in Simulink, and, more interestingly, without coding a single line of HDL! The Xilinx blockset library includes all you need for signal processing functions, error correction functions, arithmetic functions, memory control functions, and digital logic.
Moreover, Xilinx System Generator for DSP reduces development duration since you can perform the complete system simulation of the FPGA design before you generate the FPGA definitions and binary files. Therefore, less time is wasted waiting for the long compilation time. Plus, the early simulation reduces the risk of application failure.
Simulating in System Generator allows you to test the FPGA application with the same conditions as in a physical FPGA, and with the same bit width of variables and operators. The simulation result is “bit-to-bit” and “cycle” accurate, which means that each single bit is accurately processed and each operation will take the exact same number of cycles to process. Thus, there will be almost no surprises when the application is finally running in the FPGA.
Another advantage of using the Xilinx System Generator is how it simplifies the management of FPGA design interfaces. Because all the interfaces are graphically represented by simple blocks, you only need to manage one model instead of four distinct files for each FPGA core (a FPGA core is a pre-defined or user-defined circuit in the FPGA. It is similar to an object or class in conventional programming languages like C++).
Lastly, you can generate the HDL files and binary files representing your FPGA firmware directly from your Simulink project.
Interface FPGA Design and Hardware with Nutaq’s Model-Based Development Kit (MBDK)
Nutaq’s Model-Based Development Kit (MBDK) is also part of the family of graphical programming tools and can be used in conjunction with Simulink and Xilinx System Generator for DSP to create a full and powerful DAQ system development kit.
The MBDK blocksets are integrated to System Generator for DSP and are specifically designed to create an interface between your custom FPGA design and Nutaq components and peripherals. More precisely, the MBDK provides blocks that represent the interface of components or group of components of Nutaq cards (for example, ADCs, memory, RTDEx, and so on) that you can include and connect directly with your FPGA design diagram.
Without this integration of the MBDK in Simulink and System Generator, you would still be able to generate an FPGA application using System Generator for DSP, but the interface definition would have to be defined in Xilinx ISE or some other editing software to connect the FPGA design properly with the Nutaq hardware.
The following diagram shows a simple example that includes Simulink, System Generator and MBDK blocksets:
Finally, one of the most important added values of the Nutaq MBDK is that all the control logic of each block or component is implemented within the block itself. Therefore, all the low level detail required to properly operate a component, a FIFO for instance, is already provided by Nutaq, and all you need to do is focus on its application.
By using MATLAB, Simulink, Xilinx System Generator for DSP, and the Nutaq MBDK, any FPGA-based DAQ system developer has a great tool box in hand to easily and quickly create new applications without needing the expertise of an FPGA HDL developer.