HI , I have written following code for writing and reading from DDR3 of zynq. It is not displaying any outputs. What's wrong with this:
1 | #include <stdio.h> |
2 | #include "platform.h" |
3 | #include "xil_printf.h" |
4 | #include "xil_io.h" |
5 | #include "xparameters.h" |
6 | |
7 | #define DDR_BASEADDR 0x01000000
|
8 | //#define IN_BASEADDR DDR_BASEADDR + 0x1000000
|
9 | //#define TR_BASEADDR DDR_BASEADDR + 0x2000000
|
10 | //#define BIN_BASEADDR DDR_BASEADDR + 0x3000000
|
11 | |
12 | int main() |
13 | {
|
14 | init_platform(); |
15 | int i,j; |
16 | int val; |
17 | int img[5]={1,2,3,4,5}; |
18 | for (i = 0; i <5; i++) { |
19 | Xil_Out32(DDR_BASEADDR+(i), img[i]); |
20 | }
|
21 | for (j = 0; j <5; j++) { |
22 | val = Xil_In32(DDR_BASEADDR+(j)); |
23 | printf("val %d",val); |
24 | }
|
25 | cleanup_platform(); |
26 | return 0; |
27 | }
|