cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gayathri90
Explorer
Explorer
6,138 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
1 Solution

Accepted Solutions
gayathri90
Explorer
Explorer
8,565 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
6 Replies
sampatd
Scholar
Scholar
6,126 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
gayathri90
Explorer
Explorer
6,107 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
gayathri90
Explorer
Explorer
6,097 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
gayathri90
Explorer
Explorer
6,056 Views
Registered: ‎01-18-2014
I there anybody over there to help... :(
0 Kudos
gayathri90
Explorer
Explorer
8,566 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
gayathri90
Explorer
Explorer
6,001 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