UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Participant dpandya9488
Participant
961 Views
Registered: ‎08-19-2016

DDR interface with PL and PS- memory mapping "mmap" and "/dev/mem"

Hi,

I am trying to implement an interface with DDR where PL and PS both can access the location and do read and write operation.. Means that.. PL will compute some algo. and write to a location of DDR and at a particular time PS will read that same location on DDR and process the algo (implemented on PS) and write its results on some other location on DDR..and so on..

 

I am confused with what memory location I should make PL write data to DDR and which location from PS to write on DDR..From google searches I found "mmap" function calls and /dev/mem to find the memory allocation..

 

Are these correct approaches to implement the functionality I described above..? Also SDK is not able to take "/sys/mman.h" when I load the Vivado hardware to SDK and write PS logic.. alot of confusion with this iteration...

 

Any specific guide or reference link will be a great help..

 

Thanks,

Dhara

0 Kudos
3 Replies
Scholar hbucher
Scholar
927 Views
Registered: ‎03-22-2016

Re: DDR interface with PL and PS- memory mapping "mmap" and "/dev/mem"

@dpandya9488 is the PS running Linux or standalone?

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Participant dpandya9488
Participant
903 Views
Registered: ‎08-19-2016

Re: DDR interface with PL and PS- memory mapping "mmap" and "/dev/mem"

Hi,

PS is running on Linux..

 

Thanks,

Dhara

0 Kudos
Participant dpandya9488
Participant
869 Views
Registered: ‎08-19-2016

Re: DDR interface with PL and PS- memory mapping "mmap" and "/dev/mem"

Hi,

Please check the attached error message that is observed when I compile the code to access DDR from PL and PS side with CDMA IP block..

 

 

The message reads-

arm-none-eabi-gcc -Wall -O0 -g3 -I/opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/arm-linux-gnueabihf/libc/usr/include/asm -c -fmessage-length=0 -MT"src/helloworld.o" -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -I../../Design1_23Feb_bsp/ps7_cortexa9_0/include -MMD -MP -MF"src/helloworld.d" -MT"src/helloworld.o" -o "src/helloworld.o" "../src/helloworld.c"

../src/helloworld.c:22:22: fatal error: sys/mman.h: No such file or directory
 #include <sys/mman.h>
                      ^
compilation terminated.
src/subdir.mk:24: recipe for target 'src/helloworld.o' failed
make: *** [src/helloworld.o] Error 1

 
 

Also I have attached the screen shot of the same.. Let me know how to resolve this and also the proper approach to implement the DDR interface from PL and PS as mentioned in the original post..

 

Many Thanks.

ErrorMman_LibFile.jpg
0 Kudos