cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Explorer
Explorer
6,060 Views
Registered: ‎01-18-2014

Read and write DDR memory on Zedboard using C code

Jump to solution

I want to read and write to the DDR memory on ZedBoard through the Processing system.

 

I have tried the functions "Xil_Out32" and "Xil_In32" for the same. But, after reading its displaying some junk values.

 

How should these be corrected?

Are there any materials avaiable which would help on this topic?

 

 

0 Kudos
Reply
1 Solution

Accepted Solutions
Explorer
Explorer
8,487 Views
Registered: ‎01-18-2014
Finally i have found the solution to my problem with the help of my senior.. :) You should write only to the alternate locations in DDR memory. So, proper write and read are possible... Right now, going through the datasheet of DDR memory in Zedboard.. And thank you 'sampatd' for your help..

View solution in original post

0 Kudos
Reply
6 Replies
Scholar
Scholar
6,048 Views
Registered: ‎09-05-2011
You can check the OS and libraries collection document:
http://www.xilinx.com/support/documentation/sw_manuals/xilinx2014_2/oslib_rm.pdf
Explorer
Explorer
6,029 Views
Registered: ‎01-18-2014

If i am using Xil_in8 function to read, then the values are proper..

 

 

Can anyone tell why this is so??

 

Which function from 'Xil_io.h' should be used for reading and wrting to the DDR memory??

I am using Zedboard

0 Kudos
Reply
Explorer
Explorer
6,019 Views
Registered: ‎01-18-2014

I am using for loops to write into 100 locations of memory starting from the base address value specified in 'xparameters.h'.

 

After finishing the write, i am using another for loop to read these locations.

 

I am using the functions for 16 bit.

Here, I have noticed that only the value in the last location is read properly. Rest of the values are junk.

 

Is this a problem with writing to these locations??

Or is it that the read is not properly happening?

 

 

0 Kudos
Reply
Explorer
Explorer
5,978 Views
Registered: ‎01-18-2014
I there anybody over there to help... :(
0 Kudos
Reply
Explorer
Explorer
8,488 Views
Registered: ‎01-18-2014
Finally i have found the solution to my problem with the help of my senior.. :) You should write only to the alternate locations in DDR memory. So, proper write and read are possible... Right now, going through the datasheet of DDR memory in Zedboard.. And thank you 'sampatd' for your help..

View solution in original post

0 Kudos
Reply
Explorer
Explorer
5,923 Views
Registered: ‎01-18-2014
One more doubt.. For writing and reading the DDR memory, which should be the base address value? The one represented with "XPAR_DDR_MEM_BASEADDR" or "XPAR_PS7_DDR_0_S_AXI_BASEADDR". I am using only the PS. Any reply at the earliest would be of great help..
0 Kudos
Reply