First, thank you so much for open-sourcing the code. It's super useful!
I created a Java interface to use the device driver and call a hardware accelerator. The Java interface is similar to the one that you pushed as an example for Python. Unfortunately, I have some coherency issues. I created the memory mapping in Java in the following way:
I set sync_mode to 0 and sync_direction to 0. The accelerator does not support coherency. Thus, I used sync_for_cpu and sync_for_device to ensure the coherency with the CPU. When I write data from the CPU it seems to work properly. The accelerator reads the correct input data. When the accelerator writes, however, the CPU does not always read the data correctly. When the input and output data that I send to the accelerator are small, it can actually read the correct the values. When the input and output become bigger in size, the CPU reads old values for some reasons. The sizes of the data is always less than the entire size of the UDMA buffer.
I am running on an ARM64 architecture (Xilinx ZCU102).
Hi,
First, thank you so much for open-sourcing the code. It's super useful!
I created a Java interface to use the device driver and call a hardware accelerator. The Java interface is similar to the one that you pushed as an example for Python. Unfortunately, I have some coherency issues. I created the memory mapping in Java in the following way:
I set
sync_mode
to 0 andsync_direction
to 0. The accelerator does not support coherency. Thus, I usedsync_for_cpu
andsync_for_device
to ensure the coherency with the CPU. When I write data from the CPU it seems to work properly. The accelerator reads the correct input data. When the accelerator writes, however, the CPU does not always read the data correctly. When the input and output data that I send to the accelerator are small, it can actually read the correct the values. When the input and output become bigger in size, the CPU reads old values for some reasons. The sizes of the data is always less than the entire size of the UDMA buffer.I am running on an ARM64 architecture (Xilinx ZCU102).
Do you have any idea what could be the issue?