The key is the Unix system call –
The idea is to use
mmap function to map a memory-mapped components on FPGA, or a contiguous non-cacheable region of physical memory (not managed by the OS virtual memory) to the current software process's virtual memory space.
Here is an example C++ code.
mmapfunction call requests to map a region of
kSdramSizebytes of physical memory starting at
kSdramPhysicalAddress, to the current program's virtual memory (referenced by
konChipBufferSizebytes of on-chip buffer starting at
kOnChipBufferPhysicalAddressL3, to the virtual memory (referenced by
The rest of the program then moves data back-and-forth between SDRAM and on-chip buffer using the 'memcpy' system call.