Application Software Programming Model - 2023.2 English

Zynq-7000 SoC Embedded Design Tutorial (UG1165)

Document ID
UG1165
Release Date
2024-05-02
Version
2023.2 English

The application software does the following tasks:

  1. Initializes the source buffer with the specified test pattern. The source buffer location ranges from 0x20000000 to 0x2fffffff.

    Clears the destination buffer by writing all zeroes into the destination address range. The destination buffer location ranges from 0x30000000 to 0x3fffffff.

  2. Initializes the AXI CDMA IP and does the following:

    1. Associates a CDMA callback function with AXI CDMA ISR and enables the interrupt.

      This callback function executes during the CDMA interrupt. It sets the interrupt done and/or error flags depending on the DMA transfer status.

      Application software waits for the callback function to populate these flags and executes the software according to the status flag.

    2. Configures the CDMA in simple mode.

    3. Checks the status register of the CDMA IP to verify the CDMA idle status.

    4. Sets the source buffer starting location, 0x20000000, to the CDMA register.

    5. Sets the destination buffer starting location, 0x30000000, to the CDMA register.

    6. Sets the number of bytes to transfer to the CDMA register. The application software starts the DMA transfer.

  3. After the CDMA interrupt is triggered, the DMA transfer is checked status.

    If the transfer status is successful, the application software compares the source buffer location with the destination buffer location and displays the comparison result on the serial terminal, and then exits from the execution.

    If the transfer status displays an error, the software prints the error status in the serial terminal and stops running.