问题描述:
1、我在调试DDR3时,用了一片MT41JM16JT-15E的DDR3,此片FLASH与SP605开发板相比MT41JM16JT-187E(本来想定此款的,但是此款没有工业级的)。遇到了如下几个问题:
用了MIG生成之后DDR3控制器之后,参考ug388和ug416,按照步骤发现数据全部正确的,灯也正常。
在XPS中修改原有基于SP605的设计,其结果如下:
BEGIN mpmc
PARAMETER INSTANCE = MCB_DDR3
PARAMETER C_NUM_PORTS = 1
PARAMETER C_PORT_CONFIG = 1
PARAMETER C_MCB_LOC = MEMC3
PARAMETER C_MEM_CALIBRATION_SOFT_IP = TRUE
PARAMETER C_MEM_SKIP_IN_TERM_CAL = 0
PARAMETER C_MEM_SKIP_DYNAMIC_CAL = 0
PARAMETER C_MCB_RZQ_LOC = K7
PARAMETER C_MCB_ZIO_LOC = M7
PARAMETER C_MEM_TYPE = DDR3
PARAMETER C_MEM_PARTNO = CUSTOM
PARAMETER C_MEM_ODT_TYPE = 1
PARAMETER C_MEM_DATA_WIDTH = 16
PARAMETER C_PIM0_BASETYPE = 2
PARAMETER HW_VER = 6.03.a
PARAMETER C_MPMC_BASEADDR = 0x88000000
PARAMETER C_MPMC_HIGHADDR = 0x8FFFFFFF
PARAMETER C_MEM_PART_DATA_DEPTH = 64
PARAMETER C_MEM_PART_DATA_WIDTH = 16
PARAMETER C_MEM_PART_NUM_BANK_BITS = 3
PARAMETER C_MEM_PART_NUM_ROW_BITS = 13
PARAMETER C_MEM_PART_NUM_COL_BITS = 10
PARAMETER C_MEM_PART_CAS_A_FMAX = 333
PARAMETER C_MEM_PART_CAS_A = 5
PARAMETER C_MEM_PART_TRRD = 7500
PARAMETER C_MEM_PART_TRCD = 13500
PARAMETER C_MEM_PART_TCCD = 4
PARAMETER C_MEM_PART_TWR = 15000
PARAMETER C_MEM_PART_TWTR = 7500
PARAMETER C_MEM_PART_TREFI = 7800000
PARAMETER C_MEM_PART_TRFC = 110000
PARAMETER C_MEM_PART_TRP = 13500
PARAMETER C_MEM_PART_TRC = 49500
PARAMETER C_MEM_PART_TRASMAX = 70200000
PARAMETER C_MEM_PART_TRAS = 36000
BUS_INTERFACE SPLB0 = mb_plb
PORT MPMC_Clk0 = clk_66_6667MHzPLL0
PORT MPMC_Rst = sys_periph_reset
PORT MPMC_Clk_Mem_2x = clk_666_6667MHzPLL0_nobuf
PORT MPMC_Clk_Mem_2x_180 = clk_666_6667MHz180PLL0_nobuf
PORT MPMC_PLL_Lock = Dcm_all_locked
PORT mcbx_dram_addr = fpga_0_MCB_DDR3_mcbx_dram_addr_pin
PORT mcbx_dram_ba = fpga_0_MCB_DDR3_mcbx_dram_ba_pin
PORT mcbx_dram_ras_n = fpga_0_MCB_DDR3_mcbx_dram_ras_n_pin
PORT mcbx_dram_cas_n = fpga_0_MCB_DDR3_mcbx_dram_cas_n_pin
PORT mcbx_dram_we_n = fpga_0_MCB_DDR3_mcbx_dram_we_n_pin
PORT mcbx_dram_cke = fpga_0_MCB_DDR3_mcbx_dram_cke_pin
PORT mcbx_dram_clk = fpga_0_MCB_DDR3_mcbx_dram_clk_pin
PORT mcbx_dram_clk_n = fpga_0_MCB_DDR3_mcbx_dram_clk_n_pin
PORT mcbx_dram_dq = fpga_0_MCB_DDR3_mcbx_dram_dq_pin
PORT mcbx_dram_dqs = fpga_0_MCB_DDR3_mcbx_dram_dqs_pin
PORT mcbx_dram_dqs_n = fpga_0_MCB_DDR3_mcbx_dram_dqs_n_pin
PORT mcbx_dram_udqs = fpga_0_MCB_DDR3_mcbx_dram_udqs_pin
PORT mcbx_dram_udqs_n = fpga_0_MCB_DDR3_mcbx_dram_udqs_n_pin
PORT mcbx_dram_udm = fpga_0_MCB_DDR3_mcbx_dram_udm_pin
PORT mcbx_dram_ldm = fpga_0_MCB_DDR3_mcbx_dram_ldm_pin
PORT mcbx_dram_odt = fpga_0_MCB_DDR3_mcbx_dram_odt_pin
PORT mcbx_dram_ddr3_rst = fpga_0_MCB_DDR3_mcbx_dram_ddr3_rst_pin
PORT rzq = fpga_0_MCB_DDR3_rzq_pin
PORT zio = fpga_0_MCB_DDR3_zio_pin
END
但是程序进入DDR3运行时发现程序跑飞。
直接用SDK中的memory_test进行测试,结果如下:
结论:很明显在0x8800C450和0x8800C470地址时,数据发生了变异。
注:DDR3为64M*16的,其在FPGA中的基地址为:0x88000000 - 0x8FFFFFFF
从0x8F000000开始测试的结果,基本一致。
MIG中配置的DDR3如下:所用的DDR3型号为:MT41J64M16JT-15E IT:GTR
继续测试发现如下结果:
结论:第一个0x88000000数据不用管