Faster Method of Writing to Memory Map

Hello,

I am using PYNQ 2.5 on a PYNQ-Z2 board with a custom overlay. I have created a custom SPI module in the PL that is implemented as a memory mapped AXI peripheral. My PL system is running on a 100MHz fclk0 and the SPI system is running at 10MHz. The PYNQ MMIO module works with my program, but it is not fast enough in reading or writing data to the memory map for my application.

I saw that sometimes CFFI is utilized in some of the source code for PYNQ modules, so I thought that using CFFI to implement Xil_In32 and Xil_Out32 would be a solution, but I am having a hard time getting it to work in my notebook. I have attached the C code used to create the .so file, and a snippet of the code in the notebook that tries to use it. The issue I run into is that when I try to use the functions, they freeze the kernel. I have tried adding a basic adder function to my code and it worked, so I know it is specifically an issue with the Xil_In32 and Xil_Out32 functions.

Any advice/suggestions on this implementation, or other methods I can use with PYNQ to read/write faster than the MMIO module, would be appreciated. Thank you


FastMMAP.c (404 Bytes)
FastMMAP.h (82 Bytes)