| 1 |
6 |
quickwayne |
/*
|
| 2 |
|
|
* * Copyright (c) 2004 Xilinx, Inc. All rights reserved.
|
| 3 |
|
|
*
|
| 4 |
|
|
* Xilinx, Inc.
|
| 5 |
|
|
* XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A
|
| 6 |
|
|
* COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS
|
| 7 |
|
|
* ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR
|
| 8 |
|
|
* STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION
|
| 9 |
|
|
* IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE
|
| 10 |
|
|
* FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION
|
| 11 |
|
|
* XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO
|
| 12 |
|
|
* THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO
|
| 13 |
|
|
* ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE
|
| 14 |
|
|
* FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY
|
| 15 |
|
|
* AND FITNESS FOR A PARTICULAR PURPOSE.
|
| 16 |
|
|
*/
|
| 17 |
|
|
|
| 18 |
|
|
/*
|
| 19 |
|
|
* Xilinx EDK 7.1.2 EDK_H.12.5.1
|
| 20 |
|
|
*
|
| 21 |
|
|
* This file is a sample test application
|
| 22 |
|
|
*
|
| 23 |
|
|
* This application is intended to test and/or illustrate some
|
| 24 |
|
|
* functionality of your system. The contents of this file may
|
| 25 |
|
|
* vary depending on the IP in your system and may use existing
|
| 26 |
|
|
* IP driver functions. These drivers will be generated in your
|
| 27 |
|
|
* XPS project when you run the "Generate Libraries" menu item
|
| 28 |
|
|
* in XPS.
|
| 29 |
|
|
*
|
| 30 |
|
|
* Your XPS project directory is at:
|
| 31 |
|
|
* D:\mpdma
|
| 32 |
|
|
*/
|
| 33 |
|
|
|
| 34 |
|
|
|
| 35 |
|
|
// Located in: microblaze_0/include/xparameters.h
|
| 36 |
|
|
#include "xparameters.h"
|
| 37 |
|
|
|
| 38 |
|
|
#include "xutil.h"
|
| 39 |
|
|
|
| 40 |
|
|
//====================================================
|
| 41 |
|
|
|
| 42 |
|
|
int main (void) {
|
| 43 |
|
|
|
| 44 |
|
|
|
| 45 |
7 |
quickwayne |
xil_printf("-- Entering main() %s %s--\r\n", __DATE__, __TIME__);
|
| 46 |
6 |
quickwayne |
|
| 47 |
|
|
/*
|
| 48 |
|
|
* MemoryTest routine will not be run for the memory at
|
| 49 |
|
|
* 0x00000000 (dlmb_cntlr)
|
| 50 |
|
|
* because it is being used to hold a part of this application program
|
| 51 |
|
|
*/
|
| 52 |
|
|
|
| 53 |
|
|
|
| 54 |
|
|
/* Testing DDR Memory (DDR_256MB_32MX64_rank1_row13_col10_cl2_5)*/
|
| 55 |
|
|
{
|
| 56 |
|
|
XStatus status;
|
| 57 |
|
|
|
| 58 |
|
|
print("Starting MemoryTest for DDR_256MB_32MX64_rank1_row13_col10_cl2_5:\r\n");
|
| 59 |
|
|
print(" Running 32-bit test...");
|
| 60 |
|
|
status = XUtil_MemoryTest32((Xuint32*)XPAR_DDR_256MB_32MX64_RANK1_ROW13_COL10_CL2_5_MEM0_BASEADDR, 1024, 0xAAAA5555, XUT_ALLMEMTESTS);
|
| 61 |
|
|
if (status == XST_SUCCESS) {
|
| 62 |
|
|
print("PASSED!\r\n");
|
| 63 |
|
|
}
|
| 64 |
|
|
else {
|
| 65 |
|
|
print("FAILED!\r\n");
|
| 66 |
|
|
}
|
| 67 |
|
|
print(" Running 16-bit test...");
|
| 68 |
|
|
status = XUtil_MemoryTest16((Xuint16*)XPAR_DDR_256MB_32MX64_RANK1_ROW13_COL10_CL2_5_MEM0_BASEADDR, 2048, 0xAA55, XUT_ALLMEMTESTS);
|
| 69 |
|
|
if (status == XST_SUCCESS) {
|
| 70 |
|
|
print("PASSED!\r\n");
|
| 71 |
|
|
}
|
| 72 |
|
|
else {
|
| 73 |
|
|
print("FAILED!\r\n");
|
| 74 |
|
|
}
|
| 75 |
|
|
print(" Running 8-bit test...");
|
| 76 |
|
|
status = XUtil_MemoryTest8((Xuint8*)XPAR_DDR_256MB_32MX64_RANK1_ROW13_COL10_CL2_5_MEM0_BASEADDR, 4096, 0xA5, XUT_ALLMEMTESTS);
|
| 77 |
|
|
if (status == XST_SUCCESS) {
|
| 78 |
|
|
print("PASSED!\r\n");
|
| 79 |
|
|
}
|
| 80 |
|
|
else {
|
| 81 |
|
|
print("FAILED!\r\n");
|
| 82 |
|
|
}
|
| 83 |
|
|
}
|
| 84 |
|
|
|
| 85 |
7 |
quickwayne |
xil_printf("-- Exiting main() --\r\n");
|
| 86 |
6 |
quickwayne |
return 0;
|
| 87 |
|
|
}
|
| 88 |
|
|
|