Forum Discussion
Cyclone V - DMA Controller Intel FPGA IP Interrupts
Hello,
I am currently trying to find out how to trigger a transfer of DMA Controller Intel FPGA IP (connected between f2h_sdram0 and on-chip 2-port RAM in QSYS) using an interrupt from the FPGA side.
The DMA works when the transfer is started from the Linux userspace by writing GO bit (2^3) to the CONTROL register (offset 6 in the /dev/mem memory-mapped space of the controller's control_port_slave on the AXI bus).
The CONTROL register contains interrupt enable bit (2^4) but I believe it is only used to enable Interrupt Sender (irq port of the IP block).
Q: Is this IP related to the HPS' DMA Peripheral Requests (0 to 7)? If so, how to tell the IP block what request should be used as an interrupt source for trigger?
Or maybe I use wrong IP block and I should use eg. mSGDMA instead?
Thanks in advance.
15 Replies
- EBERLAZARE_I_Intel
Regular Contributor
Hi,
Do you have any other questions that I may help with?
- EBERLAZARE_I_Intel
Regular Contributor
Hi,
We do not really have a direct example for this, but to best guide you, it is the peripheral requests mentioned for DMA controller for Cyclone V SoC:
The FPGA peripherals, these channels are mapped in the registers of Cyclone V SoC here:
https://www.intel.com/content/www/us/en/programmable/hps/cyclone-v/hps.html#sfo1410067855000.html
For future usage and info on the DMA controller, you need to refer to the ARM doc , on the "using events and interrupts" section:
From there you can either use an event to restart the DMA channels or Interrupting a microprocessor. I hope these documents may help you.
- EBERLAZARE_I_Intel
Regular Contributor
Hi,
These are the interfaces, you need to refer to the Cyclone V HPS TRM, f2h interrupts:
https://www.intel.com/content/www/us/en/docs/programmable/683126/21-2/interrupts-38262.html
DMA controller interface:
Alternatively, you may want to look at an example design below from Robertofem:
- vrbavojtech
New Contributor
Hi,
thanks, I have already seen these resources before.
In the first site there is no information about using f2h interrupts directly with the DMA Controller. Of course I could use an interrupt kernel driver writing the DMA control register but that's not what I am looking for.
The second link you provided also doesn't explain how to connect the DMA Peripheral Requests (f2h_dma_reqX) to the DMA Controller QSYS. It also doesn't say how the DMA controller in the HPS is related to the QSYS component.
The third link provides source code (fpga_dmac_api.c) I have been already using (ie. the CONTROL register I mentioned in the first post). But it also doesn't relate to the interrupts or to triggering of the DMA from the FPGA side.
The only way I can think of right now is accessing the control_port_slave (Avalon MM Slave) of the DMA Controller QSYS component directly from the fabric but it would mean sharing the physical address of the allocated buffer from HPS first, which doesn't seem like a valid approach to me.
What's the proper way to accomplish this?