ARM DDR3 Memory testing
Every hardware design engineer wants to be sure that the DDR3 memory interface is working correctly. Here are some real examples of DDR3 memory testing from our open source iMX6 Rex project.
Which of the memory tests?
There are a lot of memory tests available. For this project I used three:- the standard ubuntu memtester
- stressapptest (according to the website “… It has been used at Google for some time …”)
- the Freescale memory test included in the i.MX6 DDR Stress Test Tool (the same tool which is used also for calibration)
I recommend the stressapptest.
What did I test?
I was curious, so I have done tests of “uncalibrated” and “calibrated” board. “Uncalibrated” board was using the unchanged settings of DDR3 memory registers (the same values as used on the reference board), “calibrated” board was using the proper register values which I have got after the DDR3 calibration.The results
Initially, I was running the “uncalibrated” board. The memtester software was running on this board for a week with no errors. When I used the stressapptest – the board always failed within one hour. This is how the failing looked:“Uncalibrated DDR3” – Examples of failing memory test
Log: Seconds remaining: 4350
Report Error: miscompare : DIMM Unknown : 1 : 1658s
Hardware Error: miscompare on CPU 0(0xF) at 0x2be72978(0x4ca1997a:DIMM Unknown): read:0xff7fffffffffffff, reread:0xff7fffffffffffff expected:0xff7fffffff7fffff
Log: Seconds remaining: 4840
Report Error: miscompare : DIMM Unknown : 1 : 1169s
Hardware Error: miscompare on CPU 0(0xF) at 0x2bd89a78(0x4e3c7a7a:DIMM Unknown): read:0xff7fffffffffffff, reread:0xff7fffffffffffff expected:0xff7fffffff7fffff
Log: Seconds remaining: 3100
Report Error: miscompare : DIMM Unknown : 1 : 2904s
Hardware Error: miscompare on CPU 0(0xF) at 0x38171e78(0x27dcbe7a:DIMM Unknown): read:0xff7fffffffffffff, reread:0xff7fffffffffffff expected:0xff7fffffff7fffff
Log: Seconds remaining: 5550
Report Error: miscompare : DIMM Unknown : 1 : 455s
Hardware Error: miscompare on CPU 0(0xF) at 0x2fced578(0x200f157a:DIMM Unknown): read:0xff7fffffffffffff, reread:0xff7fffffffffffff expected:0xff7fffffff7fffff
After applying the correct DDR3 settings from the DDR3 calibration (adding the correct register settings into uBoot), the same board was running perfectly.
“Calibrated DDR3” – running perfectly over night (the same board was failing before)
“Calibrated DDR3” – running perfectly over night (the same board was failing before)
Stats: Found 0 hardware incidents
Stats: Completed: 32146856.00M in 0.00s infMB/s, with 0 hardware incidents, 0 errors
Stats: Memory Copy: 32146856.00M at -24559.40MB/s
Stats: File Copy: 0.00M at 0.00MB/s
Stats: Net Copy: 0.00M at 0.00MB/s
Stats: Data Check: 0.00M at 0.00MB/s
Stats: Invert Data: 0.00M at 0.00MB/s
Stats: Disk: 0.00M at 0.00MB/s
Status: PASS - please verify no corrected errors
Here is the command line I used for the basic testing:
# stressapptest -s 3600 -M 256 -m 4 -C 4 -W
If you would like to install the strassapptest on your own ARM board, check out here.
Be aware
Be aware, that you need to test more boards. I have tested couple of “uncalibrated” boards and not all of them failed the stressapptest. When you are happy with the results (all your boards must always pass the test), take couple of boards (at least 5) and run the same tests in an environmental chamber (from -40C up to the maximum temperature … 60/70/80C ..). All the “calibrated” boards must pass your testing.Happy testing!