Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎02-12-2013

DDR memory bulk write/read

I'm trying to implement a design where I can populate the entire DDR memory with a fixed bit (0 or 1). Then I want to be able to read the entire DDR memory and make sure all cells have the right value.


So far I have been able to achieve this using Microblaze where in the C code I have a "for" loop that first populates the memory then it reads every address and compares to the value written. But this is slow.


I'm hoping I can accomplish this in a much faster way using RTL logic. Are there any Xilinx IP cores that can help me with this? I'm thinking maybe DMA? Any help or suggestion is much appreciated.



0 Kudos
1 Reply
Registered: ‎08-14-2007

Do you need to do this in a system that uses the MicroBlaze for other purposes?  Or were you saying you only have MicroBlaze because you want to test the memory?


If you need the MicroBlaze for other purposes, then the best way is to use a multi-port memory controller with a simple extra port connected to your RTL.  In the past I have used the native port interface for this since it was the simplest available at the time.  You didn't say which device or tool / revision you're using.  Most newer parts give the option of an AXI port which is also quite simple to interface.


Just remember that if the MicroBlaze is also using DDR memory for its program and or stack, you need to make sure your RTL doesn't clobber the part of memory that the MB needs.  Otherwise you should set up the RTL to do its test before you load the MB code into DDR and start it up.  It's not too hard to add a simple register (GPIO) and use that to hold off the boot loader until the RTL sets a "done" bit.


I'm sure there are many ways to do this.

-- Gabor