This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
resources:no-os:dac_dma_example [18 Mar 2021 08:51] – created Darius B | resources:no-os:dac_dma_example [14 Aug 2023 10:44] – Add Versal option for data download George Mois | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== DAC_DMA_EXAMPLE | + | ===== DMA_EXAMPLE |
+ | |||
+ | DMA_EXAMPLE is a standard example that sends a sinewave on Tx channels using DMA from a lookup table. If you physically loopback a Tx channel to an Rx channel via an electrical wire, you may run the DMA_EXAMPLE and read the received data at Rx from particular memory address. | ||
+ | |||
+ | To build the DMA_EXAMPLE demo, edit the Makefile and add **-DDMA_EXAMPLE** to CFLAGS and rebuild. Alternatively, | ||
+ | |||
+ | To run the DMA_EXAMPLE, | ||
+ | * making sure it was built with the **DMA_EXAMPLE** flag, as already mentioned | ||
+ | * monitoring the serial terminal for messages printed by the application | ||
+ | |||
+ | The application will eventually print something like this: | ||
+ | < | ||
+ | DMA_EXAMPLE: | ||
+ | </ | ||
+ | |||
+ | This means that the memory address where the data at Rx is stored is 0x7f170, there are in total 65536 samples, 16-bit wide across 4 channels, which is equivalent to 16384, 16-bit samples per channel. | ||
+ | |||
+ | At this point you may use a Tcl script to retrieve data from memory and store it into .csv files for processing: | ||
+ | < | ||
+ | for Zynq-7000: | ||
+ | xsct tools/ | ||
+ | |||
+ | for ZynqMP: | ||
+ | xsct tools/ | ||
+ | |||
+ | for Versal: | ||
+ | xsct tools/ | ||
+ | </ | ||
- | DAC_DMA_EXAMPLE is a standard example, provided in all no-OS projects, that sends a sinewave on Tx channels using DMA from a lookup table. If you physically loopback a Tx channel to an Rx channel via an electrical wire, you may run the DAC_DMA_EXAMPLE and read the received data at a predefined DDR memory address. You may retrieve the data on the computer for processing/ | ||
- | To build the DAC_DMA_EXAMPLE demo, edit the Makefile and add **-DDAC_DMA_EXAMPLE** to CFLAGS and rebuild. Alternatively, |