Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does ezdma support contiguous memory ? #7

Open
ranshalit opened this issue Jan 7, 2017 · 3 comments
Open

Does ezdma support contiguous memory ? #7

ranshalit opened this issue Jan 7, 2017 · 3 comments

Comments

@ranshalit
Copy link

Hello,

Taking a look in ezsdk code I see it use SG dma method.
Does it mean that it does not support dma_alloc_coherent (contiguous) memory allocation ?

Thank you,
Ran

@jeremytrimble
Copy link
Owner

@ranshalit,

ezdma uses scatter-gather DMA so that contiguous allocations are not necessary (though, since SG DMA is more general than traditional "contiguous" DMA, you could use ezdma on contiguously-allocated memory, although I'm not sure how you'd guarantee that from a userspace program, which is where ezdma is intended to be used).

Note that dma_alloc_coherent() is intended to create a region of memory where caching is "turned off" -- so that writes from the CPU to memory are immediately visible to devices, and likewise so that writes from devices to memory are immediately visible to the CPU, so that explicit cache flushing and invalidation calls from software aren't required. This is orthogonal to the concept of contiguous/discontiguous memory.

@ranshalit
Copy link
Author

ranshalit commented Jan 17, 2017

Hi Jeremy,
Thank you very much for the reply.
I understand from this that ezdma can support both coherent or non coherent, Right ?

Another thing if I may:
Is this package can be used in embedded and real-time applications (such as video capture) , i.e. I mean it terms of performance.

Thank you!
Ran

@jeremytrimble
Copy link
Owner

Ran,

Keep in mind that ezdma is really designed to work with "slave DMA" devices -- e.g. ones like the Xilinx AXI DMA that support either writing data from the output of some hardware device (e.g. an FPGA IP core) into CPU RAM or reading data from the CPU RAM and presenting it to the input of some hardware device.

Though I haven't tested ezdma with it, I suspect you could also use it with the Analog Devices "dmac" IP core:
HDL: https://github.com/analogdevicesinc/hdl/tree/master/library/axi_dmac
Kernel Driver: https://github.com/analogdevicesinc/linux/blob/xcomm_zynq/drivers/dma/dma-axi-dmac.c

As for embedded/real-time applications, I don't see anything that would immediately make ezdma unusable for video capture, but it's all a question of what your throughput/latency requirements are. If the data you want to bring from your FPGA into software is presented as an AXI-Stream interface, then ezdma+Xilinx AXI DMA could be a workable solution for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants