ZYNQ 裸机版本DDR测试

一、代码

#include <stdio.h>
#include "platform.h"
#include "xil_printf.h"
#include "xparameters.h"
#include "xparameters_ps.h"
#include "xil_io.h"
#define DDR_BASEARDDR      XPAR_DDR_MEM_BASEADDR + 0x10000000

int main()
{
    init_platform();

    print("Hello World\n\r");
    print("Successfully ran Hello World application");

    int  i;
         int  rev;
    for (i=0; i<32; i++)
        {
            Xil_Out32(DDR_BASEARDDR+i*4,i);
        }

        for (i=0; i<32; i++)
        {
            rev = Xil_In32(DDR_BASEARDDR+i*4);
            xil_printf( "the address at  %x data is : %x \n\r"  ,DDR_BASEARDDR+i*4, rev);
        }

    cleanup_platform();
    return 0;
}

二、测试结果
ZYNQ 裸机版本DDR测试

上一篇:转载 EMC对策----论DDR 时钟的谐波分量的辐射干扰该


下一篇:FPGA PCIE AXI Bridge FOR PCI 逻辑开发