Post Go back to editing

Running FMCOMMS3 with ZCU104, required software modifications for NO OS Vitis 2024.1

Category: Software
Product Number: AD9361
Software Version: Vivado/Vitis 2024.1

Hello,

I would like to use FMCOMMS3 with ZCU104. I use Vivado/Vitis 2024.1. I have three questions 

I have done the followings:

1-I started with the HDL of FMCOMMS3+ZCU102.

2- Modified the HDL project according to (https://wiki.analog.com/resources/fpga/docs/hdl/porting_project_quick_start_guide)  and generated the bitstream successfully.

3- Import the .xsa file to Vitis 2024.1 and could build a helloworld project first and run it on ZCU104. This step is just to show that the .xsa file is not corrupted. 

4- Cloned and built the software (no OS) as explained here https://wiki.analog.com/resources/no-os/build?rev=1733228837. I could build the project and write the bin file to ZCU104 by running "make run".

I have three questions

Q1- I would like to verify that the code modifications I did to the software is accurate. I changed the followings:

A- In app_config.h, I uncommented , "#define XILINX_PLATFORM"

B- parameters.h, I changed "#ifdef XPS_BOARD_ZCU102" to "#ifdef XPS_BOARD_ZCU104",

Are those code modifications enough? Am I missing anything? 

Q2- When I run "make run" and write the binary to zcu104, I use minicom for serial terminal (UART). It displays the following messages:

Zynq MP First Stage Boot Loader  
Release 2024.1   Nov 27 2025  -  07:44:46
PMU-FW is not running, certain applications may not be supported.
cf-ad9361-lpc: Successfully initialized (122880554 Hz)
ad9361_init : AD936x Rev 2 successfully initialized
cf-ad9361-dds-core-lpc: Successfully initialized (122880554 Hz)
DMA_EXAMPLE: address=0x46800 samples=65536 channels=4 bits=16
Done.

My question is that Is there any command line interface (cli) to interact with the hardware and change some of the design parameters? Or, every time, I want to change something, e.g., Transmit frequency, I have to change it from main.c and rerun the code?

Using this code, would it be possible to send custom data vector (any waveform IQ samples) through DMA to the DAC? Or the code needs to be modified to do that? Does the DMA example work by uncommenting "#define DMA_EXAMPLE" in app_config.h?

Q3- When I run "make sdkopen" to open vitis (for debugging), it does not work and throws the following error. How can I run vitis please?

****** Vitis Development Environment
****** Vitis v2024.1 (64-bit)
 **** SW Build 5074859 on 2024-05-20-23:21:20
   ** Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
   ** Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.

Error: Unsupported option '-workspace=/home/XX/no-OS/projects/ad9361/build'
Syntax: vitis [--classic | -a | -w | -i | -s | -h | -v]

Options:
  Launches New Vitis IDE (default option).
 -classic/--classic
        Launch classic Vitis IDE.
 -a/--analyze [<summary file | folder | waveform file: *.[wdb|wcfg]>]
        Open the summary file in the Analysis view.
        Opening a folder opens the summary files found in the folder.
        Open the waveform file in a waveform view tab.
        If no file or folder is specified, opens the Analysis view.
 -w/--workspace <workspace_location>
        Launches Vitis IDE with the given workspace location.
 -i/--interactive
        Launches Vitis python interactive shell.
 -s/--source <python_script>
        Runs the given python script.
 -j/--jupyter
        Launches Vitis Jupyter Web UI.
 -h/--help
        Display help message.
 -v/--version
        Display Vitis version.

Thank you,

Thread Notes

  • Hi  

    Did you check on FMC pin mapping differences between ZCU102 vs ZCU104.

    SDK not opening issue may be with version. Pls try building with some earlier version.

    Regards,

     SJ

  • Hi  ,

    Although we don't offer support for the ZCU104, I will try to answer your questions.

    Q1 A - OK

    Q1 B - The check for XPS_BOARD_ZCU102 is there to distinguish between the macro settings for different platforms (ZCU102 in this case). As you only work with ZCU104, you should define your macros and set values from your xparameters.h file generated based on your *.xsa.

    Q2 - There is no command line interface for communicating with the hardware. You could add that easily. For the DMA example, follow the instructions here https://wiki.analog.com/resources/no-os/dac_dma_example 

    Q3 - Currently only support for Eclipse-based Vitis, as SJ said.

    Regards,

    G

  • Thank you for your reply and sorry for my late response (I just came back from leave).

    Yes, I did check on FMC pin mapping and did change the constraints files to reflect the difference between the FMC of ZCU102 and ZCU104.

    Regarding the SDK version, is there a specific earlier version that you know it works fine when running "make sdkopen"? So I directly install it the right version. Thank you!

  • Thank you for your reply and sorry for my late response (I just came back from leave).

    Q1 B "The check for XPS_BOARD_ZCU102 is there to distinguish between the macro settings for different platforms (ZCU102 in this case). As you only work with ZCU104, you should define your macros and set values from your xparameters.h file generated based on your *.xsa."

    Below is part of the code in parameters.h file that is related to ZCU102/4. 

    I verified that the values in the blue colour are defined in xparameters.h, which is probably what you referred to in your answer.

    For the values in the green colour, I found a question about them in the forum (https://ez.analog.com/microcontroller-no-os-drivers/f/q-a/141937/modifying-ad9361-no-os-for-trenz-ultrascale) and I could verify the values of the first two only (GPIO_RESET_PIN and GPIO_SYNC_PIN). However, I do not know how the remaining green values have been selected. So I did not change those values and left them similar to ZCU102. Do I need to change them (from GPIO_RESET_PIN_2 to GPIO_TXNRX_PIN) please? If I need to change them, could you please provide any guidance how to do that? Thank you!

    -----------------------------------------------

    // #ifdef XPS_BOARD_ZCU102       I commented this line and added the next line instead
    #ifdef XPS_BOARD_ZCU104          
    #define GPIO_DEVICE_ID                XPAR_PSU_GPIO_0_DEVICE_ID      This variable is defined in xparameters.h
    #ifdef FMCOMMS5
    #define GPIO_RESET_PIN                130
    #define GPIO_SYNC_PIN                129
    #define GPIO_RESET_PIN_2            143
    #define GPIO_CAL_SW1_PIN            137
    #define GPIO_CAL_SW2_PIN            138
    #else
    #define GPIO_RESET_PIN                124                                  I verified this value           
    #define GPIO_SYNC_PIN                123                                    I verified this value
    #define GPIO_RESET_PIN_2            113                                  Not sure how to verify/change this value
    #define GPIO_CAL_SW1_PIN            107                                 Not sure how to verify/change this value
    #define GPIO_CAL_SW2_PIN            108                                 Not sure how to verify/change this value
    #endif
    #define GPIO_ENABLE_PIN                125                               Not sure how to verify/change this value
    #define GPIO_TXNRX_PIN                126                                 Not sure how to verify/change this value
    #define SPI_DEVICE_ID                XPAR_PSU_SPI_0_DEVICE_ID      This variable is defined in xparameters.h
    #define UART_IRQ_ID                XPAR_XUARTPS_0_INTR                  This variable is defined in xparameters.h
    #else
    ---------------------------------------------------------

    Q3/ Regarding the SDK/Vitis version, is there a specific earlier version that you know it works fine when running "make sdkopen"?

    Thank you!

  • Hi  ,

    Q1B The values for the macros (that you will find to be used in the no-OS code) are dependent on your HDL implementation.

    Q3 All versions before 2023.2 should be fine (e.g., 2022.1).

    Regards,

    G

  • Hi  

    Thank you for your prompt reply!

    "Q1B The values for the macros (that you will find to be used in the no-OS code) are dependent on your HDL implementation."

    I would like to get more insight into Q1B question please. What I would like to find out is the exact relation between the values in the HDL implementation (system_top.v) and the values for the macros in the no OS (parameters.h).

    Below is the part of the HDL implementation about the gpio values (copied from system_top.v). The commented part of the code was originally for ZCU102 and I commented it and modified to fit ZCU104 based on the FMC and other differences between the two boards.

    -------------------------   HDL implementation (system_top.v) starts here ----

      assign gpio_resetb = gpio_o[46:46];
      assign gpio_sync = gpio_o[45:45];
      assign gpio_en_agc = gpio_o[44:44];
      assign gpio_ctl = gpio_o[43:40];
    //  assign gpio_bd_o = gpio_o[20:13];
      assign gpio_bd_o = gpio_o[20:17];
      
      assign gpio_i[94:40] = gpio_o[94:40];
      assign gpio_i[39:32] = gpio_status;
      assign gpio_i[31:13] = gpio_o[31:13];
    //  assign gpio_i[12: 0] = gpio_bd_i;
      assign gpio_i[12:8] = 5'b00000;
      assign gpio_i[7: 0] = gpio_bd_i;

    --------------------------- HDL implementation (system_top.v) ends here--------------------------

    Below is the relevant part of the values for the macros in parameters.h.

    #define GPIO_RESET_PIN                124                                  I verified this value           
    #define GPIO_SYNC_PIN                 123                                    I verified this value
    #define GPIO_RESET_PIN_2            113                                  Not sure how to verify/change this value
    #define GPIO_CAL_SW1_PIN            107                                 Not sure how to verify/change this value
    #define GPIO_CAL_SW2_PIN            108                                 Not sure how to verify/change this value
    #endif
    #define GPIO_ENABLE_PIN                125                               Not sure how to verify/change this value
    #define GPIO_TXNRX_PIN                126                                 Not sure how to verify/change this value
    #define SPI_DEVICE_ID                XPAR_PSU_SPI_0_DEVICE_ID      This variable is defined in xparameters.h
    #define UART_IRQ_ID                XPAR_XUARTPS_0_INTR                  This variable is defined in xparameters.h

    --------------------------  

    Next, I would like to know the relation between the values for the macros and the HDL implementation.

    Based on this discussion (https://ez.analog.com/microcontroller-no-os-drivers/f/q-a/141937/modifying-ad9361-no-os-for-trenz-ultrascale), they mentioned that "For ZCU102, the  GPIO numbers were obtained by adding 78 to the index specified in system_top.v (e.g., gpio_resetb = gpio_o[46:46]; => GPIO_RESET_PIN = 46 + 78 = 124)"

    It seems to me that this is applicable to the first two macros only (GPIO_RESET_PIN and GPIO_SYNC_PIN). How about the remaining macros? Could you comment about that and provide any guidance how I can select the values of the remaining macros please? 

    Your help is very much appreciated!

    Thank you!

  • Hi  ,

    The GPIOs in the system_top.v file might be a superset, used for different project configurations. For example, it is possible that your code does not use GPIO_RESET_PIN_2. Anyway, the offset of 78 remains.

    I would first check to see if the macros are used in your C code, and just then search for the corresponding values in the system_top.v file. I assume you are using the AD9361 no-OS project: https://github.com/analogdevicesinc/no-OS/tree/main/projects/ad9361/src 

    If you look at the code you will see that GPIO_RESET_PIN_2, GPIO_SYNC_PIN, GPIO_CAL_SW1_PIN and GPIO_CAL_SW2_PIN are used only for FMCOMMS5.

    Regards,

    G

  • Thank you very much 

    This is quite helpful!