When I run the memory tests provided in "xutil.h" on my external memory, either some or all of the tests fail, or the program hangs.
What is causing this problem, and how can I debug it?
When the memory tests fail or hang, it could be for one or more of the following reasons:
- The design has failed timing.
To check whether the design has failed timing, examine the PAR and Timing Analyzer reports for the design.
If the design has failed timing, consider increasing the implementation effort levels or applying appropriate constraints in the system UCF file.
- The parameters for the memory controller core connecting the external memory to the processor were set inappropriately in the system MHS file.
To ensure that the memory controller core parameters are set appropriately, cross-reference the values for the memory controller core parameters in the MHS file with the relevant device specifications provided in the external memory data sheet.
- There is an endian architecture mismatch between the memory controller core and the external memory device. Both the MicroBlaze and PowerPC processors are Big Endian architectures. In such instances, the MSB of a bus is defined as bit 0 of the bus.
However, memory device data sheets tend to label buses in Little Endian format. It is quite common to incorrectly connect the MSB of the memory controller core address and data buses to the LSB of the associated external memory device buses.
Ensure that the MSBs of the address and data buses on the memory controller core are connected to the MSBs of the associated buses on the external memory device.