Main Content

Reference Designs for RFSoC Devices

SoC Blockset™ provides the following reference designs for the supported RFSoC devices.

  • Generic design with real DAC/ADC and real-time interfaces — This design receives and transmits real data and supports digital-to-analog converter (DAC) and analog-to-digital converter (ADC) real-time ports.

  • Generic design with I/Q DAC/ADC and real-time interfaces — This design receives and transmits complex in-phase/quadrature (I/Q) data and supports DAC and ADC real-time ports.

Add an RF Data Converter block to your Simulink® model to use these functionalities of the RFSoC reference designs:

  • Real-time NCO ports for DAC and ADC

  • Real-time ports for ADC

  • External PLL

  • Different parameter values for each selected DAC and ADC

Generate an IP core for a design under test (DUT) and integrate the generated IP core into these reference designs. Connect the IP core with rest of the design by using the AXI4-Stream to software, software to AXI4-Stream, AXI4 Master, interrupt, AXI4-Lite, and DAC and ADC real or I/Q interfaces. The figure shows how the interfaces connect the processor to the DUT:

The figure shows a reference design that includes DMA IPs to handle data streaming between the processor and the IP core. The IP core connects to the external memory using an AXI4 Master interface. The design includes DAC and ADC real-time and stream interfaces that connect the DUT to the RF Data Converter IP. It also includes an interrupt interface from the DUT to the processor.

Supported Interface Methods

You can use the RFSoC reference designs with these interfaces:

  • Register Interface (AXI4-Lite or AXI4) — Use this interface to access the control and status registers in your design. You can choose between AXI4-Lite or AXI4 protocol for the register interface. Use AXI4-Lite if you need only lightweight data transfers. Use AXI4 to connect to components that support burst data transfers. For more information, see Register Interface (AXI4-Lite/AXI4) (HDL Coder).

  • AXI4 Master — Use this interface for designs that require you to access memory, or to control other IP cores with AXI4 or AXI4-Lite interfaces. Example applications include moving large amounts of data between your algorithm and external DDR memory. For more information, see AXI4 Master (HDL Coder).

  • AXI4-Stream — Use this interface for moving streaming data or transferring data at high speeds. Example applications include transferring large amounts of data between processors and FPGAs using direct memory access (DMA). For more information, see AXI4-Stream (HDL Coder).

  • External I/O and External Port — Use this interface to connect to peripherals on your hardware board, such as LEDs, push buttons, DIP switches, FPGA pins, and so on. For more information, see External I/O and External Port (HDL Coder).

  • FPGA Data Capture — Use this interface to capture raw data from outputs or signals by using test points in your design and then use the data to debug your design. For more information, see FPGA Data Capture (HDL Coder).

  • Interrupt — Use this interface to send interrupt signal from DUT to processor to trigger an event-driven task.

  • DAC and ADC Stream — Use this interface to transmit and receive real or complex I/Q data between the DUT and the RF Data Converter IP, based on the selected reference design.

  • DAC and ADC Real-Time — Use this interface to connect the DUT to the DAC and ADC real-time ports of the RF Data Converter IP. This interface is available only if you have an RF Data Converter block in your model.

Supported Boards

You can use the RFSoC reference design architectures with these target platforms:

  • Xilinx® Zynq® UltraScale+™ RFSoC ZCU111 Evaluation Kit

  • Xilinx Zynq UltraScale+ RFSoC ZCU208 Evaluation Kit

  • Xilinx Zynq UltraScale+ RFSoC ZCU216 Evaluation Kit

Target Algorithm to Reference Design

To target your algorithm in Simulink to the RFSoC reference design:

  1. Model your algorithm.

  2. On the HDL Code tab of the Simulink toolstrip, in the Output section, set the drop-down button to IP Core.

  3. Select your DUT and make sure that Code for is set to this DUT.

  4. Open the HDL Code Generation > Target tab of the Configuration Parameters dialog box by clicking the Settings button.

  5. Set Target Platform to a supported hardware board listed in Supported Boards. Ensure that the Synthesis Tool is set to Xilinx Vivado.

  6. Set Reference Design to Generic design with real DAC/ADC and real-time interfaces or Generic design with I/Q DAC/ADC and real-time interfaces.

    Configuration Parameters dialog box open on the HDL Code Generation > Target tab, with the Reference Design parameter highlighted in the right pane.

Set Reference Design Parameters

In the Configuration Parameters dialog box, on the HDL Code Generation > Target tab, set reference design parameters to the required values.

Note

If your model includes an RF Data Converter block, the code generation process uses all the parameter values you specify in the block. If the model does not include this block, the process uses the reference design parameters for code generation.

The RFSoC reference design has these configuration parameters:

  • AXI stream to software data width

    Specify data width for AXI4-Stream to software interface as 32, 64, or 128 bits.

  • Software to AXI stream data width

    Specify data width for software to AXI4-Stream interface as 32, 64, or 128 bits.

  • ADC sampling rate (MHz)

    Specify the sampling rate for ADC as a scalar in a range that is based on the selected hardware board. This table shows the ADC sampling rate range for the supported RFSoC devices.

    RFSoC DeviceSampling Rate Range (MHz)

    ZCU111

    [1000, 4096]

    ZCU208

    [1000, 5000]

    ZCU216

    [500, 2500]
  • ADC decimation mode (xN)

    Specify the decimation factor. The ZCU111 RFSoC device supports decimation factors of 1, 2, 4, and 8. The ZCU208 and ZCU216 RFSoC devices support decimation factors of 1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, and 40.

  • ADC samples per clock cycle

    Specify the number of samples per clock cycle for ADC as an integer from 1 to 16. The supported values for the number of samples per clock cycle vary with the selected hardware board and reference design.

    The ADC stream data width is: 16 x ADC samples per clock cycle.

    The ADC stream clock frequency is: ADC sampling rate (MHz) / ADC decimation mode (xN) x ADC samples per clock cycle.

  • ADC mixer type

    Specify the mixer type for ADC as Bypassed, Coarse, or Fine. The Generic design with real DAC/ADC and real-time interfaces reference design supports Bypassed mixer type. The Generic design with I/Q DAC/ADC and real-time interfaces reference design supports Coarse and Fine mixer types.

  • DAC sampling rate (MHz)

    Specify the sampling rate for DAC as a scalar in a range that is based on the selected hardware board. This table shows the DAC sampling rate range for the supported RFSoC devices.

    RFSoC DeviceSampling Rate Range (MHz)

    ZCU111

    [500, 6554]

    ZCU208

    [500, 7000]

    ZCU216

    [500, 7000]
  • DAC interpolation mode (xN)

    Specify the interpolation factor. The ZCU111 RFSoC device supports interpolation factors of 1, 2, 4, and 8. The ZCU208 and ZCU216 RFSoC devices support interpolation factors of 1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, and 40.

  • DAC samples per clock cycle

    Specify the number of samples per clock cycle for DAC as an integer from 1 to 16. The supported values for the number of samples per clock cycle vary with the selected hardware board and reference design.

    The DAC stream data width is: 16 x DAC samples per clock cycle.

    The DAC stream clock frequency is: DAC sampling rate (MHz) / DAC interpolation mode (xN) x DAC samples per clock cycle.

  • DAC mixer type

    Specify the mixer type for DAC as Bypassed, Coarse, or Fine. The Generic design with real DAC/ADC and real-time interfaces reference design supports Bypassed mixer type. The Generic design with I/Q DAC/ADC and real-time interfaces reference design supports Coarse and Fine mixer types.

  • DAC DUC mode

    Specify the DUC mode for DAC as Full DUC Nyquist (0-Fs/2), IMR Low-Pass (0-Fs/2), IMR High-Pass (Fs/2-Fs), or DUC Bypass. This mode decides the maximum sampling rate for DAC.

    Dependencies

    To enable this parameter, set Target Platform to Xilinx Zynq UltraScale+ RFSoC ZCU208 Evaluation Kit or Xilinx Zynq UltraScale+ RFSoC ZCU216 Evaluation Kit.

  • ADC/DAC NCO mixer LO (GHz)

    Specify the NCO mixer frequency values as a scalar. The value of this parameter is valid only when you set ADC Mixer type and DAC Mixer type to Fine.

    Dependencies

    To enable this parameter, set Reference Design to Generic design with I/Q DAC/ADC and real-time interfaces.

  • Enable multi-tile sync

    Enable multi-tile synchronization (MTS) by setting this parameter to true. For more information about MTS, see Multi tile sync.

  • Tile clock output frequency (MHz)

    This parameter is read-only. It shows the frequency of the clock generated by the ADC tile. The reference design uses this frequency as an input to generate the required clock for the DUT. The ADC sampling rate derives the value of this parameter.

  • DUT synthesis frequency (MHz)

    This parameter is read-only. It shows the frequency of the clock that drives the DUT. The DAC or ADC sampling rate, interpolation or decimation factor, and DAC or ADC samples per clock cycle derive the value of this parameter.

  • PLL reference clock (MHz)

    This parameter is read-only. It shows the frequency of the input reference clock to the internal PLL in the DAC or ADC tile.

  • FPGA Data Capture (HDL Verifier required)

    Generate and integrate the data capture IP into the reference design. Use FPGA data capture to observe signals from your design while the design is running on the FPGA. This feature captures a window of signal data from the FPGA and returns the data to MATLAB® or Simulink over a JTAG connection. To capture data over a JTAG connection, set this parameter to JTAG. To capture data over an Ethernet connection, set this parameter to PL Ethernet. Then, map each signal that you want to capture to the FPGA Data Capture interface.

    Note

    • FPGA data capture in Configuration Parameters support programmable logic (PL) Ethernet only. The processing system (PS) Ethernet is not supported.

    • To enable the PL Ethernet option for the Xilinx boards that have the Ethernet physical layer (PHY), manually add the Ethernet media access controller (MAC) Hub IP in the plugin_board file using the addEthernetMACInterface (HDL Coder) method before you open the Configuration Parameters dialog box.

    • FPGA data capture in Configuration Parameters does not support SGMII interface.

Map DUT Ports

To automatically map the DUT ports to the required interfaces, on the System on Chip tab, click Map Interfaces. You can view and edit the interface mapping by following these steps:

  1. On the HDL Code tab, click Target Interface to open the IP Core editor.

  2. Select the Interface Mapping tab to map each DUT port to one of the IP core target interfaces. If no mapping table appears, click the Reload IP core settings Icon to update the interface mapping table button to compile the model and repopulate the DUT ports and their data types.

  3. Validate your settings by clicking the Validate IP core settings Icon to validate IP core configuration settings button.

Generate IP Core and Program FPGA

Generate the IP core and the FPGA bitstream file. Then, program the FPGA by following these steps:

  1. In the Simulink toolstrip, on the HDL Code tab, click Build Bitstream to generate the IP core and bitstream file. Wait until the synthesis tool runs in the external window.

  2. Expand the Build Bitstream menu. Then, select Program Target Device to download the bitstream.

Generate Host Interface Script

Verify the generated IP core on the hardware board by using the generated host interface script. This script contains the DUT ports and interface mapping information. Use this script to access the board memory, DUT registers, and AXI4-Stream interfaces from MATLAB. To generate a host interface script file, in the Simulink toolstrip, on the HDL Code tab, expand the Host Interface Script menu. Then, select Host Interface Script. This option generates these MATLAB files:

  • gs_modelName_setup — This script adds the AXI4 slave, AXI4-Stream, and memory interfaces. The script also contains DUT port objects that contain the port name, direction, data type, and interface mapping information. The script then maps the DUT ports to the corresponding interfaces.

  • gs_modelName_interface — This script creates a target object, instantiates the setup script gs_modelName_setup, and then connects to the target hardware. The script then sends read and write commands to the generated HDL IP core.

For more information about host interface script, see Host Interface Script Files (HDL Coder).

Generate Software Interface Model

To target your hardware board, you can generate a software model in addition to the FPGA model. This action generates two models: a hardware interface model and a software interface model. It also generates two libraries that contain the interface blocks used in the generated models.

The software interface model and its library are generated only if you have Embedded Coder® and SoC Blockset Support Package for AMD FPGA and SoC Devices installed.

  • You can use the hardware interface model to control the reference design on the board, including IP core, from the Simulink model, without Embedded Coder.

  • The software interface model enables you to target your software algorithms to the ARM® processor on the board.

For more information about software interface model, see Generate SoC Software Model.

See Also

Related Topics