搜索
bottom↓
回复: 5

SOPC中增加SRAM IDT71V416后如何使片外的IDT71V416工作起来?

[复制链接]

出0入0汤圆

发表于 2010-9-29 12:02:22 | 显示全部楼层 |阅读模式
开发环境:  Quartus II V9.0        NIOS II IDE V9.0

问题: 在NIOS II IDE V9.0中进行Run As----->Hardware Nios II时出现:

Using cable "USB-Blaster [USB-0]", device 1, instance 0x00
Pausing target processor: OK
Reading System ID at address 0x000018B0: verified
Initializing CPU cache (if present)
OK

Downloading 00008020 ( 0%)
Downloading 00020020 ( 0%)
Downloading 00080000 ( 1%)
Downloaded 18KB in 0.3s (60.0KB/s)

Verifying 00008020 ( 0%)
Verifying 00020020 ( 0%)
Verifying 00080000 ( 1%)
Verify failed between address 0x80000 and 0x8461B
Leaving target processor paused

    在system.h中查知,该地址为片外的SRAM的地址,推断SRAM未能正确配置好,以致不能工作。如下为相关的硬件以及系统配置图注,望对能发现问题、找出问题所在有所帮助。
    在硬件连接上有:片外两片SRAM IDT71V416S,两片连接的不同之处在于:DB高低16位线,控制线OE_N2、cs_n2 与OE_N、cs_n;而BHE与BLE是公用的

    在sopc builder中添加与设置SRAM,并用三态桥连接(插入一下:在sopc builder中添加与设置SRAM IDT71V416S有两个地方,一个在memory 下,一个在legacy componment,哪个才是呢?)
   
                在Cpu中exception vector选择sram;

                在NIOS II IDE的系统工程设置中,设置为片外的SRAM,以及片内的onchip_rom;

        *注:如果这两个地方均把sram设置为onchip_ram则“一开始的问题”不会存在能使流水灯正确点亮(故此,我更i加认为是SRAM的初始化的问题,没能使得正确的工作!)
       
        以下为不能理解的地方,估计问题在这里:

    从sopc builder产生到Quartus II 9.0中,SRAM的细节:注意到有:be_n_to_the_sram[3..0]
        就是be_n_to_the_sram[3..0]这个地方不知道怎么连接?好像该标号代表的是:Byte write enable或者是什么意思!!!但在硬件上没有四个pin 来连接的:
                               引脚分配                                 实际硬件连接信号
        set_location_assignment  PIN_W14 -to write_n_to_the_sram        ——WE_N
        set_location_assignment  PIN_T14 -to be_n_to_the_sram[0]        ——BLE_N
        set_location_assignment  PIN_Y14 -to be_n_to_the_sram[1]        ——BHE_N
       
        set_location_assignment  PIN_R15 -to read_n_to_the_sram        ——OE_N
        set_location_assignment  PIN_U15 -to select_n_to_the_sram        ——CS_N
       
还有第二片的SRAM的OE_N2、CS_N2如何连呢?
是否还需要编程来实现呢?

整体就是这样了!总而言之,如何才能让片外的SRAM IDT71V416S工作起来。刚开始接触这方面的知识,考虑欠缺,还望不吝指教!能清楚些最好了。感谢了!

阿莫论坛20周年了!感谢大家的支持与爱护!!

知道什么是神吗?其实神本来也是人,只不过神做了人做不到的事情 所以才成了神。 (头文字D, 杜汶泽)

出0入0汤圆

发表于 2010-9-29 14:04:14 | 显示全部楼层
我刚写个单片256Kx16Bit的接口IP。
[原创].怎样定制SRAM的Avalon接口IP,以供Nios II使用.[Memory][Nios II][Quartus II][SOPC Builder]
http://www.cnblogs.com/yuphone/archive/2010/09/27/1836519.html

出0入0汤圆

 楼主| 发表于 2010-9-29 14:53:45 | 显示全部楼层
非常感谢!我进去看看^^谢谢!

出0入0汤圆

 楼主| 发表于 2010-10-9 10:10:49 | 显示全部楼层
我在参考定制SRAM的Avalon接口IP做的时候,出现下面这个问题:
Info: Elaborating entity "niosii_sram" for hierarchy "niosii_sram:inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst|niosii_sram:niosii_sram_inst"
............不断的重复........然后
Error: Project too complex: hierarchy path is too long
Error: Entity "niosii_sram" is instantiated by entity "niosii_sram"
这个问题怎么解决呢?老是出现,然后电脑就好像进入一个死循环一样,很慢....

出0入0汤圆

 楼主| 发表于 2010-10-9 10:47:09 | 显示全部楼层
能否在“打开nios_core_inst.v,根据该Nios II软核系统例化模板文件,编辑顶层文件nios_sram.v”中再详细一点呢?我生成的nios_core_inst.v与顶层文件nios_sram.v分别为:
  //Example instantiation for system 'niosii_core_sram'
  niosii_core_sram niosii_core_sram_inst
    (
      .clk_50                           (clk_50),
      .coe_SRAM_ADDR_from_the_sram      (coe_SRAM_ADDR_from_the_sram),
      .coe_SRAM_CE_N_from_the_sram      (coe_SRAM_CE_N_from_the_sram),
      .coe_SRAM_DQ_to_and_from_the_sram (coe_SRAM_DQ_to_and_from_the_sram),
      .coe_SRAM_LB_N_from_the_sram      (coe_SRAM_LB_N_from_the_sram),
      .coe_SRAM_OE_N_from_the_sram      (coe_SRAM_OE_N_from_the_sram),
      .coe_SRAM_UB_N_from_the_sram      (coe_SRAM_UB_N_from_the_sram),
      .coe_SRAM_WE_N_from_the_sram      (coe_SRAM_WE_N_from_the_sram),
      .in_port_to_the_pio_key           (in_port_to_the_pio_key),
      .out_port_from_the_pio_led        (out_port_from_the_pio_led),
      .reset_n                          (reset_n)
    );
************与***********
module niosii_core_sram (
                          // 1) global signals:
                           clk_50,
                           reset_n,

                          // the_pio_key
                           in_port_to_the_pio_key,

                          // the_pio_led
                           out_port_from_the_pio_led,

                          // the_sram
                           coe_SRAM_ADDR_from_the_sram,
                           coe_SRAM_CE_N_from_the_sram,
                           coe_SRAM_DQ_to_and_from_the_sram,
                           coe_SRAM_LB_N_from_the_sram,
                           coe_SRAM_OE_N_from_the_sram,
                           coe_SRAM_UB_N_from_the_sram,
                           coe_SRAM_WE_N_from_the_sram
                        )
;

  output  [ 17: 0] coe_SRAM_ADDR_from_the_sram;
  output           coe_SRAM_CE_N_from_the_sram;
  inout   [ 15: 0] coe_SRAM_DQ_to_and_from_the_sram;
  output           coe_SRAM_LB_N_from_the_sram;
  output           coe_SRAM_OE_N_from_the_sram;
  output           coe_SRAM_UB_N_from_the_sram;
  output           coe_SRAM_WE_N_from_the_sram;
  output  [  2: 0] out_port_from_the_pio_led;
  input            clk_50;
  input   [  2: 0] in_port_to_the_pio_key;
  input            reset_n;

wire             clk_50_reset_n;
  wire    [ 17: 0] coe_SRAM_ADDR_from_the_sram;
  wire             coe_SRAM_CE_N_from_the_sram;
..............................................
);
endmodule
如何修改注意部分,只需在module中增加相关的,如:
nios_core nios_core_inst  

16 (  

17   .clk_50                           (CLOCK_50),  

18   //  

19   .coe_SRAM_ADDR_from_the_sram      (SRAM_ADDR),  

20   .coe_SRAM_CE_N_from_the_sram      (SRAM_CE_N),  

21   .coe_SRAM_DQ_to_and_from_the_sram (SRAM_DQ),  

22   .coe_SRAM_LB_N_from_the_sram      (SRAM_LB_N),  

23   .coe_SRAM_OE_N_from_the_sram      (SRAM_OE_N),  

24   .coe_SRAM_UB_N_from_the_sram      (SRAM_UB_N),  

25   .coe_SRAM_WE_N_from_the_sram      (SRAM_WE_N),  

26   //  

27   .out_port_from_the_pio            (Q_LED),  

28   .reset_n                          (Q_KEY)  

29 );  

文件就行了么?.inst文件不用动了吧!

若是这样的话,我就出现了以上的问题了。快崩溃了,麻烦在指教一下吧,谢谢了!!

出0入0汤圆

发表于 2012-12-8 18:33:47 | 显示全部楼层

xilinx的FPGA调试IDT71V416遇到问题    仿真时序看不出问题   但是下载以后就是不能用!!
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片。注意:要连续压缩2次才能满足要求!!】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-7-24 07:25

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表