edk12.2与SDRAM的问题

[复制链接]
3440|6
 楼主| LIU_XF 发表于 2010-12-15 15:34 | 显示全部楼层 |阅读模式
EDK12.2在BSB时,就没有SDR SDRAM的选项,只有DDR/DDR2

而我的板上却是SDR SDRAM,只好在工程建完后,到IP Catalog里去找

添加MPMC后,我Config IP,将type设为SDRAM

选择MT48LC16M16A2,我板上的是HY57V561620,我看过datasheet 它们是兼容的

然后点击OK

连接port

我让SDRAM只跑50M

用clock_generator_0生成两路时钟,一个为系统时钟sys_clk
一个为sdram_clk

从datasheet中了解到mpmc有static phy和mig phy,我的IP配制成的是static phy

当配制成phy时,需要调整时钟相位,我新建了一个DCM模块,将sdram clk接入DCM再由CLK0输出, MPMC的 PSEN
PSINCDEC  PSDONE接到DCM上

DCM的CLK0接到MPMC_Clk_Mem

不知这样接是否正确

MPMC的其它引脚就引出去接到SDRAM芯片上了

编辑UCF,锁引脚,管脚电平约束CMOS33

编译下载,不能正确读写数据,不知是何故

在官方的DEMO中,都是DDR的例程

可我的是SDRAM,datasheet看得是迷里迷糊

现在只希望有一个范例能参考一下,那就太好了

在网上看到有EDK10.1的软件在BSB时,可以添加SDR SDRAM的DEVICE

但12.2的却没有

如果能在BSB里添加,那IP都默认给配制好了,不用自已去配制,连接端口

现在很苦闷,不知道问题出在哪

一点办法都没有

传上MHS和UCF

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
 楼主| LIU_XF 发表于 2010-12-15 15:35 | 显示全部楼层
贴出测试程序

  Xuint8* destination_location = (unsigned char *) XPAR_SDRAM_MPMC_BASEADDR;

   print("-- Entering main() --\r\n");

   *destination_location++ = 0x1;
        *destination_location++ = 0x2;
        *destination_location++ = 0x10;
        *destination_location++ = 0xf5;
        *destination_location++ = 0x1;
        *destination_location++ = 0x2;
        *destination_location++ = 0x10;
        *destination_location++ = 0xf5;
        *destination_location++ = 0x1;
        *destination_location++ = 0x2;
        *destination_location++ = 0x10;
        *destination_location++ = 0xf5;
       
        destination_location = (unsigned char *) XPAR_SDRAM_MPMC_BASEADDR;
       
        xil_printf("0x%x\r\n",*destination_location++);
        xil_printf("0x%x\r\n",*destination_location++);
        xil_printf("0x%x\r\n",*destination_location++);
        xil_printf("0x%x\r\n",*destination_location++);
        xil_printf("0x%x\r\n",*destination_location++);
        xil_printf("0x%x\r\n",*destination_location++);
        xil_printf("0x%x\r\n",*destination_location++);
        xil_printf("0x%x\r\n",*destination_location++);
        xil_printf("0x%x\r\n",*destination_location++);
        xil_printf("0x%x\r\n",*destination_location++);
        xil_printf("0x%x\r\n",*destination_location++);
        xil_printf("0x%x\r\n",*destination_location++);
STARM 发表于 2010-12-15 16:45 | 显示全部楼层
amini 发表于 2010-12-16 10:24 | 显示全部楼层
爱在2012 发表于 2010-12-20 21:33 | 显示全部楼层
bit6019 发表于 2010-12-21 17:24 | 显示全部楼层
STARM 发表于 2010-12-22 11:10 | 显示全部楼层
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:无

68

主题

372

帖子

3

粉丝
快速回复 在线客服 返回列表 返回顶部