Allocate specific memory addresses in Pynq

Hi,

I came across this interesting topic and I was wondering how to allocate specific memory addresses in Pynq. I am currently deploying a DL model on PYNQ-Z2. However, when I noticed the DDR address read from the PL, it changes each time I deploy a different model and this is not really deterministic. I would prefer to use specific addresses or heap of addresses to make this more specific, your reply is appreciated, the script used is the pynq_driver via a runtime.

EA

2 Likes

Do you mean how you would allocate memory in PS DRAM? This memory is virtual and managed by the OS, so allocation will be dynamic.
If you really want to allocate specific physical memory, I think you can try do this from C or C++ program or other languages but PYNQ doesn’t support this directly.
I’d suggest you avoid this. If the memory you want to allocate isn’t available (e.g. if the OS is using it for something else) then your design may fail.

Cathal

Hi,

Thank you, I really want to allocate specific physical memory for some research analysis only, I have done some memory tracing and I have some specific memory to allocate which I believe will not conflict for my current usage.

I am interested to temporarily allocate this memory and check the static memory allocation behaviour. Can this be form of C program be integrated along with the pynq driver memalloc?

OK. There isn’t support for this in PYNQ but if you search on Linux forums you may be able to find ways to do this at a lower level (E.g. C).
It would be up to you to integrate this with PYNQ.

Cathal