User Tools

Site Tools


access_memory-mapped_accelerators_on_fpga_from_software_on_arm_with_os

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
access_memory-mapped_accelerators_on_fpga_from_software_on_arm_with_os [2016/05/30 13:37]
lianruo
access_memory-mapped_accelerators_on_fpga_from_software_on_arm_with_os [2016/05/30 13:40] (current)
lianruo
Line 5: Line 5:
 Here is [[http://​www.legup.org/​memcpy_transfer.cc|an example C++ code]]. Here is [[http://​www.legup.org/​memcpy_transfer.cc|an example C++ code]].
   - The main function starts with opening the ''/​dev/​mem''​ device file.   - The main function starts with opening the ''/​dev/​mem''​ device file.
-  - Then the first ''​mmap''​ function call requests to map a region of ''​kSdramSize''​ bytes of physical memory starting at ''​kSdramPhysicalAddress'',​ to the current program'​s virtual memory (referenced by sdram_mmap). +  - Then the first ''​mmap''​ function call requests to map a region of ''​kSdramSize''​ bytes of physical memory starting at ''​kSdramPhysicalAddress'',​ to the current program'​s virtual memory (referenced by ''​sdram_mmap''​). 
-  - The second ''​mmap'​ function maps ''​konChipBufferSize''​ bytes of on-chip buffer starting at ''​kOnChipBufferPhysicalAddressL3'',​ to the virtual memory (referenced by ocb_mmap).+  - The second ''​mmap'' function maps ''​konChipBufferSize''​ bytes of on-chip buffer starting at ''​kOnChipBufferPhysicalAddressL3'',​ to the virtual memory (referenced by ''​ocb_mmap''​).
  
 The rest of the program then moves data back-and-forth between SDRAM and on-chip buffer using the '​memcpy'​ system call. The rest of the program then moves data back-and-forth between SDRAM and on-chip buffer using the '​memcpy'​ system call.
  
access_memory-mapped_accelerators_on_fpga_from_software_on_arm_with_os.txt · Last modified: 2016/05/30 13:40 by lianruo