This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
resources:no-os:dac_dma_example [24 Dec 2021 12:10] – implement feedback Darius B | resources:no-os:dac_dma_example [29 Mar 2024 19:44] (current) – Specified the number of channels to be plotted iulia Moldovan | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== DAC_DMA_EXAMPLE | + | ===== DMA_EXAMPLE |
- | DAC_DMA_EXAMPLE | + | DMA_EXAMPLE |
- | To build the DAC_DMA_EXAMPLE | + | To build the DMA_EXAMPLE |
- | To run the DAC_DMA_EXAMPLE, you simply need to run the application as usual by: | + | To run the DMA_EXAMPLE, you simply need to run the application as usual by: |
- | * making sure it was built with the **DAC_DMA_EXAMPLE** flag, as already mentioned | + | * making sure it was built with the **DMA_EXAMPLE** flag, as already mentioned |
* monitoring the serial terminal for messages printed by the application | * monitoring the serial terminal for messages printed by the application | ||
The application will eventually print something like this: | The application will eventually print something like this: | ||
< | < | ||
- | DAC_DMA_EXAMPLE: address=0x7f170 samples=65536 channels=4 bits=16 | + | DMA_EXAMPLE: address=0x7f170 samples=65536 channels=4 bits=16 |
</ | </ | ||
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. | 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: | + | At this point you may use a Tcl script to retrieve data from memory and store it into .csv files for processing. In the terminal where you built the project, run the following command while being in the no-OS/ |
< | < | ||
- | xsct legacy/scripts/xilinx_capture.tcl ZYNQ_PS7 0x7f170 65536 4 16 # for Zynq-7000 | + | for Zynq-7000: |
- | xsct legacy/scripts/xilinx_capture.tcl ZYNQ_PSU 0x7f170 65536 4 16 # for ZynqMP | + | xsct ../../tools/scripts/platform/ |
+ | |||
+ | for ZynqMP: | ||
+ | xsct ../../tools/scripts/platform/ | ||
+ | |||
+ | for Versal: | ||
+ | xsct ../ | ||
</ | </ | ||
+ | |||
+ | After running the xsct command, some .csv files will be created in your directory. Now you need to run the Python script for plotting, specifying the number of channels you want to plot, like this: | ||
+ | |||
+ | < | ||
+ | python3 ../ | ||
+ | </ | ||
+ | |||
+ | and a plot window will open showing the Rx channels. | ||