在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 2455|回复: 3

下载到开发板上遇到一个与仿真不同的问题:波形不一致!

[复制链接]
发表于 2009-2-25 10:18:34 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

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

x
下载到开发板上遇到一个与仿真不同的问题:波形不一致!

我用嵌入式分析仪抓数据发现波形与我仿真时的波形不一致
比较奇怪

我的设计思路是通过串口接受数据
然后把接收的数据写入sram器件里面去

但发现那个控制信号与仿真时不一致(见附图所示)


跟sram接口相关的代码如下:

-----------------------------------------------------------------------------------------
always @(posedge i_Clock or negedge i_Reset_n)
  if(~i_Reset_n)begin  
    SRAM_STATE<=`SRAM_IDLE;
    Write_ack<=0;
    Read_ack<=0;
   end
  else begin
    Write_ack<=0;
    Read_ack<=0;
    case (SRAM_STATE)
     `SRAM_IDLE:begin
       Write_ack<=0;
       Read_ack<=0;
       case({Write_req,Read_req})
        2'b10:begin
          SRAM_STATE<=`SRAM_WRITE;
          Write_ack<=1;
         end
        2'b01:begin
          SRAM_STATE<=`SRAM_READ;   
         end
        default:SRAM_STATE<=`SRAM_IDLE;
       endcase
      end
     `SRAM_WRITE:begin
       SRAM_STATE<=`SRAM_IDLE;  
      end
     `SRAM_READ:begin
       SRAM_STATE<=`SRAM_READ_KEEP;
      end
     `SRAM_READ_KEEP:begin
       SRAM_STATE<=`SRAM_IDLE;
       Read_ack<=1;
      end
     default:begin
       SRAM_STATE<=`SRAM_IDLE;
       Write_ack<=0;
       Read_ack<=0;
      end
    endcase
   end
-----------------------------------------------------------------------------------------
assign io_Sram_data  =(o_Sram_OE_n) ? Sys_dataout:{16{1'bz}};
assign Sys_datain    = io_Sram_data;
//
always @(posedge i_Clock or negedge i_Reset_n)
  if(~i_Reset_n)begin
    o_Sram_CE_n<=1;
    o_Sram_WE_n<=1;
    o_Sram_OE_n<=1;
    o_Sram_UB_n<=1;
    o_Sram_LB_n<=1;
    o_Sram_add<={16{1'b0}};
   end
  else begin
    case(SRAM_STATE)
     `SRAM_IDLE:begin
       o_Sram_CE_n<=1;
       o_Sram_WE_n<=1;
       o_Sram_OE_n<=1;
       o_Sram_UB_n<=1;
       o_Sram_LB_n<=1;
       o_Sram_add<=Sys_ADDR;
      end
     `SRAM_WRITE:begin  
       o_Sram_CE_n<=0;
       o_Sram_WE_n<=0;
       o_Sram_OE_n<=1;
       o_Sram_UB_n<=0;
       o_Sram_LB_n<=0;
       o_Sram_add<=Sys_ADDR;
      end
     `SRAM_READ,
      `SRAM_READ_KEEP:begin
       o_Sram_CE_n<=0;
       o_Sram_WE_n<=1;
       o_Sram_OE_n<=0;
       o_Sram_UB_n<=0;
       o_Sram_LB_n<=0;
       o_Sram_add<=Sys_ADDR;
      end
     default:begin
       o_Sram_CE_n<=1;
       o_Sram_WE_n<=1;
       o_Sram_OE_n<=1;
       o_Sram_UB_n<=1;
       o_Sram_LB_n<=1;
       o_Sram_add<=Sys_ADDR;
      end
    endcase
   end
-----------------------------------------------------------------------------------------
Snap1.jpg
Snap2.jpg
Snap3.jpg
 楼主| 发表于 2009-2-25 10:21:39 | 显示全部楼层
而且也发现o_TX的波形也是与仿真时的波形时反向来着
 楼主| 发表于 2009-2-25 10:32:04 | 显示全部楼层
还有一个问题是altera的嵌入式逻辑分析仪 为何有些数据可以产生用于抓取的信号 而有些不能
甚至有些模块连一个信号可抓取的都没有

altera的嵌入式逻辑分析仪一般针对哪些信号时可抓取的呢?
 楼主| 发表于 2009-2-28 10:34:20 | 显示全部楼层
我单独用uart发送模块给pc传数据 可以正常通过串口调试工具收到数据
例如我发1234 可以收到这个数据

我在看报告的时候发现这样的提示:
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|Write_req" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|SRAM_Sys_dataout[15]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|SRAM_Sys_dataout[14]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|SRAM_Sys_dataout[13]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|SRAM_Sys_dataout[12]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|SRAM_Sys_dataout[11]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|SRAM_Sys_dataout[10]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|SRAM_Sys_dataout[9]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|SRAM_Sys_dataout[8]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|SRAM_Sys_dataout[7]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|SRAM_Sys_dataout[6]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|SRAM_Sys_dataout[5]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|SRAM_Sys_dataout[4]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|SRAM_Sys_dataout[3]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|SRAM_Sys_dataout[2]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|SRAM_Sys_dataout[1]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|SRAM_Sys_dataout[0]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|UART_Sys_dataout[15]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|UART_Sys_dataout[14]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|UART_Sys_dataout[13]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|UART_Sys_dataout[12]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|UART_Sys_dataout[11]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|UART_Sys_dataout[10]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|UART_Sys_dataout[9]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|UART_Sys_dataout[8]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|UART_Sys_dataout[7]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|UART_Sys_dataout[6]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|UART_Sys_dataout[5]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|UART_Sys_dataout[4]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|UART_Sys_dataout[3]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|UART_Sys_dataout[2]" with stuck data_in port to stuck value GND
Warning: Reduced register "CRT2SRAM_DATAPATH:CRT2SRAM_DATAPATH|UART_Sys_dataout[1]" with stuck data_in port to stuck value GND

感觉是不是那个地方可能写的不对导致综合后给优化掉了还是怎的?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

小黑屋| 手机版| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-11-16 17:45 , Processed in 0.029194 second(s), 9 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表