Example C2H Flow - 3.4 English

Versal Adaptive SoC CPM DMA and Bridge Mode for PCI Express Product Guide (PG347)

Document ID
PG347
Release Date
2024-05-30
Version
3.4 English

In the example C2H flow, loaddriver.sh loads the devices for all available channels. The dma_from_device user program transfers data from Card to host.

The example C2H flow sequence is as follows:
  1. Open device C2H and initialize the DMA.
  2. The user program allocates buffer pointer (based on size), passes pointer to read function with specific device (C2H) and data size.
  3. The driver creates descriptor based on size and initializes the DMA with descriptor start address. Also if there are any adjacent descriptor.
  4. The driver writes control register to start the DMA transfer.
  5. The DMA reads descriptor from host and starts processing each descriptor.
  6. The DMA fetches data from Card and sends data to host. After all data is transferred based on the settings, the DMA generates an interrupt to host.
  7. The ISR driver processes the interrupt to find out which engine is sending the interrupt and checks the status to see if there are any errors and also checks how many descriptors are processed.
  8. After the status is good, the drive returns transfer byte length to user side so it can check for the same.