cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
3,880 Views
Registered: ‎07-28-2009

SDRAM (MT48LC32M16A2-75) interface problem in EDK11.4

  hi, I have some problem with XPS11.4 . I was using a SDR SDRAM (MT48L32M16A2),with the mpmc control.to virtex 4 sx35ff668-10.

  my mhs file :

BEGIN microblaze
 PARAMETER INSTANCE = microblaze_0
 PARAMETER C_INTERCONNECT = 1
 PARAMETER C_DEBUG_ENABLED = 1
 PARAMETER HW_VER = 7.20.d
 PARAMETER C_USE_ICACHE = 0
 PARAMETER C_CACHE_BYTE_SIZE = 128
 PARAMETER C_ICACHE_ALWAYS_USED = 1
 PARAMETER C_USE_DCACHE = 0
 PARAMETER C_DCACHE_BYTE_SIZE = 128
 PARAMETER C_DCACHE_ALWAYS_USED = 1
 PARAMETER C_ICACHE_BASEADDR = 0x24000000
 PARAMETER C_ICACHE_HIGHADDR = 0x27ffffff
 PARAMETER C_DCACHE_BASEADDR = 0x24000000
 PARAMETER C_DCACHE_HIGHADDR = 0x27ffffff
 BUS_INTERFACE DPLB = mb_plb
 BUS_INTERFACE IPLB = mb_plb
 BUS_INTERFACE DEBUG = microblaze_0_mdm_bus
 BUS_INTERFACE IXCL = microblaze_0_IXCL
 BUS_INTERFACE DXCL = microblaze_0_DXCL
 BUS_INTERFACE DLMB = dlmb
 BUS_INTERFACE ILMB = ilmb
 PORT MB_RESET = mb_reset
END

BEGIN mpmc
 PARAMETER INSTANCE = mpmc_0
 PARAMETER HW_VER = 5.04.a
 PARAMETER C_MEM_PARTNO = CUSTOM
 PARAMETER C_MEM_TYPE = SDRAM
 PARAMETER C_NUM_PORTS = 2
 PARAMETER C_PIM0_BASETYPE = 1
 PARAMETER C_MEM_DATA_WIDTH = 16
 PARAMETER C_USE_STATIC_PHY = 1
 PARAMETER C_STATIC_PHY_RDEN_DELAY = 8
 PARAMETER C_MPMC_CLK0_PERIOD_PS = 15000
 PARAMETER C_PI0_RD_FIFO_MEM_PIPELINE = 1
 PARAMETER C_PI0_RD_FIFO_APP_PIPELINE = 1
 PARAMETER C_PI0_WR_FIFO_MEM_PIPELINE = 1
 PARAMETER C_PI0_WR_FIFO_APP_PIPELINE = 1
 PARAMETER C_PI0_ADDRACK_PIPELINE = 1
 PARAMETER C_WR_DATAPATH_TML_PIPELINE = 1
 PARAMETER C_MEM_PART_DATA_DEPTH = 1
 PARAMETER C_MEM_PART_DATA_WIDTH = 16
 PARAMETER C_MEM_PART_NUM_BANK_BITS = 2
 PARAMETER C_MEM_PART_NUM_ROW_BITS = 13
 PARAMETER C_MEM_PART_NUM_COL_BITS = 10
 PARAMETER C_MEM_PART_CAS_A_FMAX = 133
 PARAMETER C_MEM_PART_CAS_A = 3
 PARAMETER C_MEM_PART_TRRD = 15000
 PARAMETER C_MEM_PART_TRCD = 20000
 PARAMETER C_MEM_PART_TWR = 15000
 PARAMETER C_MEM_PART_TREFI = 7812500
 PARAMETER C_MEM_PART_TRFC = 66000
 PARAMETER C_MEM_PART_TRP = 20000
 PARAMETER C_MEM_PART_TRC = 66000
 PARAMETER C_MEM_PART_TRASMAX = 120000000
 PARAMETER C_MEM_PART_TRAS = 44000
 PARAMETER C_PIM1_BASETYPE = 2
 PARAMETER C_XCL0_B_IN_USE = 1
 PARAMETER C_MPMC_BASEADDR = 0x24000000
 PARAMETER C_MPMC_HIGHADDR = 0x27ffffff
 PARAMETER C_MPMC_CTRL_BASEADDR = 0x20000000
 PARAMETER C_MPMC_CTRL_HIGHADDR = 0x2000ffff
 BUS_INTERFACE MPMC_CTRL = mb_plb
 BUS_INTERFACE XCL0 = microblaze_0_IXCL
 BUS_INTERFACE XCL0_B = microblaze_0_DXCL
 BUS_INTERFACE SPLB1 = mb_plb
 PORT MPMC_Rst = proc_Peripheral_Reset
 PORT MPMC_Clk0 = clk_66_6667MHzDCM0
 PORT SDRAM_CS_n = sdram_cs_n
 PORT SDRAM_Clk = sdram_clk
 PORT SDRAM_WE_n = sdram_we
 PORT SDRAM_CAS_n = sdram_cas
 PORT SDRAM_RAS_n = sdram_ras
 PORT SDRAM_CE = sdram_ce
 PORT SDRAM_BankAddr = sdram_ba
 PORT SDRAM_Addr = sdram_addr
 PORT SDRAM_DQ = mpmc_0_SDRAM_DQ
 PORT SDRAM_DM = sdram_dm
 PORT MPMC_Clk_Mem = SDR_SDRAM_MPMC_Clk_Mem
 PORT MPMC_DCM_PSEN = Static_Phy_DCM_PSEN
 PORT MPMC_DCM_PSINCDEC = Static_Phy_DCM_PSINCDEC
 PORT MPMC_DCM_PSDONE = Static_Phy_DCM_PSDONE
 PORT MPMC_InitDone = mpmc_0_MPMC_InitDone
END

BEGIN dcm_module
 PARAMETER INSTANCE = dcm_module_0
 PARAMETER HW_VER = 1.00.d
 PARAMETER C_CLK0_BUF = TRUE
 PARAMETER C_CLKOUT_PHASE_SHIFT = VARIABLE_POSITIVE
 PARAMETER C_EXT_RESET_HIGH = 0
 PARAMETER C_PHASE_SHIFT = 0
 PARAMETER C_CLK180_BUF = FALSE
 PARAMETER C_CLKIN_PERIOD = 15.0
 PARAMETER C_CLKFB_BUF = FALSE
 PORT RST = Dcm_all_locked
 PORT CLKIN = clk_66_6667MHzDCM0
 PORT CLKFB = SDR_SDRAM_MPMC_Clk_Mem
 PORT CLK0 = SDR_SDRAM_MPMC_Clk_Mem
 PORT PSDONE = Static_Phy_DCM_PSDONE
 PORT LOCKED = dcm_module_0_LOCKED
 PORT PSEN = Static_Phy_DCM_PSEN
 PORT PSCLK = clk_66_6667MHzDCM0
 PORT PSINCDEC = Static_Phy_DCM_PSINCDEC
END

BEGIN clock_generator
 PARAMETER INSTANCE = clock_generator_0
 PARAMETER C_EXT_RESET_HIGH = 0
 PARAMETER C_CLKIN_FREQ = 66666667
 PARAMETER C_CLKOUT0_FREQ = 133333333
 PARAMETER C_CLKOUT0_PHASE = 0
 PARAMETER C_CLKOUT0_GROUP = NONE
 PARAMETER C_CLKOUT0_BUF = TRUE
 PARAMETER HW_VER = 3.02.a
 PARAMETER C_CLKOUT1_FREQ = 66666667
 PARAMETER C_CLKOUT1_PHASE = 0
 PARAMETER C_CLKOUT1_GROUP = DCM0
 PARAMETER C_CLKOUT1_BUF = TRUE
 PORT CLKIN = dcm_clk_s
 PORT CLKOUT0 = clk_133_3333MHz
 PORT RST = sys_rst_s
 PORT LOCKED = Dcm_all_locked
 PORT CLKOUT1 = clk_66_6667MHzDCM0
END

 

  The function I use to write and write from memory:

 1. select  plb4.6 port   

 for(myAdr = startAdr; myAdr < startAdr+MEM_SIZE; myAdr=myAdr+4) {
      WR_WORD(myAdr, 0x12345678);
    }
   

    for(myAdr = startAdr; myAdr < startAdr+MEM_SIZE; myAdr=myAdr+4) {
      RD_WORD(myAdr, DataRead);

 

   result :     DataRead :0x56785678

 

    why?

 2. select xcl port

    it is wrong .

      

 

  please help me !

0 Kudos
4 Replies
Highlighted
Xilinx Employee
Xilinx Employee
3,861 Views
Registered: ‎08-01-2007

Have you checked the DRAM calibration status?

0 Kudos
Highlighted
Visitor
Visitor
3,854 Views
Registered: ‎07-28-2009

 yes.

 i have check  calibration .

run the Mpmc Calibration Example,but status = XST_FAILURE.

also,MPMC_InitDone = 1.

 

 

0 Kudos
Highlighted
Visitor
Visitor
3,852 Views
Registered: ‎07-28-2009

   the program stop 

   MpmcCheckPattern();

 

0 Kudos
Highlighted
Visitor
Visitor
3,846 Views
Registered: ‎07-28-2009

i select  xcl  for external memory accesses.

 

      status =  MpmcCalibrationExample(XPAR_MPMC_0_DEVICE_ID);     
      if(status != XST_SUCCESS){
         return  XST_FAILURE;
      }
        for(i = 0; i<128 ;i++){
           XIo_Out32(MEM_BASEADDR+i,i);
        }   
        while(1){
           for(i = 0; i<128 ;i++){
            value = XIo_In32(MEM_BASEADDR+i);       
           } 
        }

 

 the program  exit retun XST_FAILURE;

 not excute

        for(i = 0; i<128 ;i++){
           XIo_Out32(MEM_BASEADDR+i,i);
        }   
        while(1){
           for(i = 0; i<128 ;i++){
            value = XIo_In32(MEM_BASEADDR+i);       
           } 
        }

.

 delect  calibration example ,only  write and read memory.

 result:

 address             data

 0x24000000    0x001f001f

 0x24000004    0x001f001f

 0x24000006    0x001f001f

 0x24000008    0x001f001f

 0x2400000c    0x001f001f

 0x24000010    0x001f001f

 0x24000014    0x001f001f

 0x24000018    0x001f001f

 0x2400001c    0x001f001f

 0x24000020    0x003f003f

 0x24000024    0x003f003f

 0x24000028    0x003f003f

 0x2400002c   0x003f003f

 0x24000030    0x003f003f

 0x24000034    0x003f003f

 0x24000038    0x003f003f

 0x2400003c    0x003f003f

  ……

0 Kudos