求救!!这个错误是什么意思啊?

[复制链接]
8228|12
 楼主| jakfens 发表于 2011-9-16 12:39 | 显示全部楼层 |阅读模式
RS, ge, os, se, ST
本帖最后由 jakfens 于 2011-9-16 16:26 编辑
  1. //----------------------------------------------------------//
  2. always@(posedge clk_divide or posedge rst)
  3. begin
  4. if(rst)
  5. begin
  6. {rs,rw,en}<=3'b000;
  7. data<=8'b00000001;
  8. sta<=0;
  9. end


  10. /*while(sta<1023)
  11. begin
  12. sta<=sta+1;
  13. end*/
  14. /*else if(sta<1023)
  15. sta<=sta+1;*/
  16. else repeat(1022)
  17. sta<=sta+1;

  18. case(sta)

  19. 400: //0x38 set of the display
  20. begin
  21. {rs,rw,en}<=3'b001;
  22. data<=8'b00111000;
  23. end
  24. 410: //0x0c open the display and close the sursor
  25. begin
  26. {rs,rw,en}<=3'b001;
  27. data<=8'b00001100;
  28. end
“Xst:1312 - Loop has iterated 64 times. Use "set -loop_iteration_limit XX" to iterate more.”
RT 设置循环重复次数??怎么设?
 楼主| jakfens 发表于 2011-9-16 13:02 | 显示全部楼层
 楼主| jakfens 发表于 2011-9-16 13:26 | 显示全部楼层
本帖最后由 jakfens 于 2011-9-16 16:08 编辑

还有一个问题

“ERROR:Xst:899 - "newlcd.v" line 82:The logic for <data> does not match a known FF or Latch template. The description style you are using to describe a register or latch is not supported in the current software release.

网上说是前一个if后面没有else  必需要加个else
但是加了一个else后那个check syntex就出错误了 所以估计不是else的问题
“ERROR:HDLCompilers:26 - "newlcd.v" line 221 expecting 'end', found 'else'
ERROR:HDLCompilers:26 - "newlcd.v" line 221 unexpected token: '<='
ERROR:HDLCompilers:26 - "newlcd.v" line 221 unexpected token: ';'
Module <lcd_control> compiled
ERROR:HDLCompilers:26 - "newlcd.v" line 222 expecting 'endmodule', found 'end'
Analysis of file <"newlcd.prj"> failed.”
bairan168 发表于 2011-9-16 14:44 | 显示全部楼层
:L,晕死,我竟然没看出错误。
 楼主| jakfens 发表于 2011-9-16 14:52 | 显示全部楼层
呃 看哪里?? 4# bairan168
 楼主| jakfens 发表于 2011-9-16 14:54 | 显示全部楼层
error

本帖子中包含更多资源

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

×
 楼主| jakfens 发表于 2011-9-17 22:11 | 显示全部楼层
anybody know?
 楼主| jakfens 发表于 2011-9-19 13:44 | 显示全部楼层
86

本帖子中包含更多资源

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

×
 楼主| jakfens 发表于 2011-9-19 14:50 | 显示全部楼层
在xilinx官方论坛里面一个老外帮我找滴
还是老外厉害啊

本帖子中包含更多资源

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

×
dan_xb 发表于 2011-9-20 12:56 | 显示全部楼层
这个代码风格。。。。。汗啊
你要是想做一个计数器做时间轴,那你就直接写一个计数器,不要搞成状态机
例如:

always @ (posedge clk)
  if(!rst_n)
    sta<=0;
  else if(sta==1023)
    sta<=0;
  else
    sta<=sta+1;

always @(posedge clk)
  if(!rst_n)
    a<=0;
  else if(sta==400)
    a<=1;
.........................
 楼主| jakfens 发表于 2011-9-20 13:47 | 显示全部楼层
呵呵 主要是方便 因为要做个LCD控制器来玩玩 用case比较方便吧
不过还是受教了 11# dan_xb
diny 发表于 2011-9-26 18:27 | 显示全部楼层
汗。真难找出来。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:鄙视电工就是鄙视全人类的智慧;抛弃电子就是毁灭文明,人类将回到刀割火种的时代

30

主题

1865

帖子

2

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