Prototype Wireless Communications Algorithms on Hardware
Hardware support packages are Add Ons that connect MATLAB® and Simulink® simulations to hardware. Add Ons such as Communications Toolbox™ Support Package for Xilinx® Zynq®-Based Radio and SoC Blockset™ Support Package for Xilinx Devices enable you to design, prototype, and verify your designs on hardware. With these support packages, you can:
Use the Xilinx Zynq-based radio as an I/O peripheral to transmit and receive real-time arbitrary waveforms.
Transmit and receive RF signals out of the box and configure RF radio settings easily, enabling quick testing of SDR designs under real-world conditions.
Model memory interfaces, ADC and DAC interfaces, and communication between the FPGA and processor on an SoC device.
Customize and prototype wireless communications algorithms. Target only the FPGA fabric of the device, or deploy partitioned hardware-software co-design implementations across the ARM® processor and the FPGA fabric of the device.
Run application examples to get started.
The workflow to target the FPGA on your Zynq board uses generated HDL code from HDL Coder™ and the HDL Coder Support Package for Xilinx Zynq Platform or HDL Coder Support Package for Xilinx RFSoC Devices. If you also target the ARM processor for a hardware-software codesign, the workflow additionally uses Simulink Coder™, Embedded Coder®, and Embedded Coder Support Package for Xilinx Zynq Platform.
For examples of how to deploy the Wireless HDL Toolbox™ reference applications to hardware devices, see:
How to Install Support Packages
A support package is an add-on that enables you to use a MathWorks® product with specific third-party hardware and software. Support packages use the license of the base product. For instance, Communications Toolbox Support Package for Xilinx Zynq-Based Radio requires a license for Communications Toolbox.
Install support packages using the MATLAB Add-Ons menu. You can also use the Add-Ons menu to update installed support package software or update the firmware on third-party hardware.
To install support packages, on the MATLAB Home tab, in the Environment section, click Add-Ons > Get Hardware Support Packages. You can filter this list by selecting categories (such as hardware vendor or application area), or by performing a keyword search.
Search the Add-Ons list for
Zynq, and find
these support packages:
Communications Toolbox Support Package for Xilinx Zynq-Based Radio
SoC Blockset Support Package for Xilinx Devices
HDL Coder Support Package for Xilinx RFSoC Devices
HDL Coder Support Package for Xilinx Zynq Platform
Embedded Coder Support Package for Xilinx Zynq Platform (needed only for hardware-software co-design)
When the support package installation is complete, you must set up the host computer and radio hardware. For Windows® systems, the installer provides guided setup steps. For Linux® systems, the installer links to manual setup instructions.
Design Requirements for Using Communications Toolbox Support Package for Xilinx Zynq-Based Radio
The Communications Toolbox Support Package for Xilinx Zynq-Based Radio provides a reference design that you can use to create an IP core that integrates into the radio hardware. Use the HDL Workflow Advisor to guide you through generating a shareable and reusable IP core module using the reference design.
To work with the reference design, your FPGA targeted design must use a streaming data interface with a control signal that indicates the validity of each sample. Wireless HDL Toolbox blocks provide this interface. Use the Sample Control Bus Selector block to separate the valid control signal from the bus.
To deploy a design using the support package, your design must meet these preconditions.
Each data input or output must be 16 bits. The HDL subsystem that fits into the reference design does not support complex signals at the ports. To handle complex inputs and outputs, model separate I and Q ports at the subsystem boundaries.
Model all the ports for a given reference design, even when the ports are not used.
In Simulink, the input and output data and valid signals must be driven at the same sample rate. Therefore, the input and output clock rates of the subsystem must be equal.
Clock the data and valid signals at the fastest rate of the HDL subsystem.
For the FPGA-only targeting workflow:
Duplex operation is not supported. Use either the transmit or the receive operation, but not both.
For the hardware-software co-design workflow:
Duplex operation is supported. You can use both the Transmitter and Receiver blocks in the same design.
AXI4-Lite register ports can be clocked at arbitrary rates.
In single-channel mode, you can transmit or receive data frames containing an even number of samples only. If you use an odd number of samples, the software inserts a zero sample at the end of each frame.
The real-time design encounters a larger volume of data and a larger set of state progressions than you can simulate in Simulink. Make sure to model and generate control logic to handle the restart between subframes. Consider adding extra subsystem ports for debug visibility of these extended states once the design is deployed to the board.
Design for Debugging
Once the design is deployed to the board, you have much less visibility of the internal signals in your design. To improve visibility, you can add temporary output ports to your subsystem before you generate your IP core. Signals that can help with debugging are design state, mux select signals or other control parameters, and data values at intermediate stages of the data path. You can also add input ports and muxes to give the option for external control of parameters such as mux select signals and gain values.
When you simulate the design on the board in External mode, you can drive and view these ports from Simulink. The generated software model provides a Simulink interface to the input and output ports of your design while it is running on the board.
Once you are confident that your design is behaving as intended, you can remove these ports and regenerate the IP core.
Another debugging strategy is to include a known input signal stored in memory on the
FPGA. This memory can be part of the generated HDL code from your Simulink model. The LTE MIB Recovery and Cell Scanner Using Analog Devices AD9361/AD9364 (Communications Toolbox Support Package for Xilinx Zynq-Based Radio) example shows an input port
externalDataSel that provides a switch
between a stored data set and the live data from the radio.
- Communications Toolbox Support Package for Xilinx Zynq-Based Radio
- FPGA Targeting Workflow (Communications Toolbox Support Package for Xilinx Zynq-Based Radio)
- Hardware-Software Co-Design Workflow (Communications Toolbox Support Package for Xilinx Zynq-Based Radio)
- Xilinx Devices (SoC Blockset)
- Generate Design Using SoC Builder (SoC Blockset)