In order to provide the communication between a program running on Linux and the hardware in the FPGA, a Linux device driver can help.
The driver should provide all the APIs required for the communication including:
1- Reading and writing into registers in hardware
2-Memory allocation to be shared between hardware and software
3-Interrupt handling
The device driver code provided [here] provide such APIs.
In this code:
1- Reading and writing hardware registers are done using ioctl command.
2- The mmap function provided for contiguous memory allocation. The memory can be cacheable or not.
3-interrupt APIs provided to inform the software of finished tasks in the harware
More details of how to use this drive will be explained in the next blogs.