您的位置:首页 > 其它

自己整理的:学习verilog DHL问题笔记——Quartus常见错误

2011-12-15 23:00 639 查看
我初学verilog语言,很多细节都没注意,按着自己的思想就写了,编译的时候才发现各种问题。这些都是我在学习中遇到的问题,还是很常见的。

1.Error (10028): Can't resolve multiple constant drivers for net ……

解析:不能在两个以上always内对同一变量赋值,这个细节一般看书看资料会看到,但是编程时,就是没想到。

2.Error (10158): Verilog HDL Module Declaration error at clkseg.v(1): port "XXXX" is not declared as port

解析:大意了,端口类型还没定义啊!

3.Error (10110): variable "en" has mixed blocking and nonblocking Procedural Assignments -- must be all blocking or all nonblocking assignments

解析:en在程序中有时用非阻塞赋值,有时用阻塞赋值,这是禁止的。在初学的时候,可能分得不是很清楚,所以在检查时,一定要一步步观察慢慢来。

4.Error (10161): Verilog HDL error at clkseg.v(36): object "count" is not declared

解析:这个错误应该很明显啦,只要能读得懂。

5.Error (10170): Verilog HDL syntax error at clkseg.v(37) near text "***"; expecting ";"

解析:意思应该也很简单,就是检查的时候要细心点。

6.Error (10171): Verilog HDL syntax error at ir_ctrl.v(149) near end of file ; expecting an identifier, or "endmodule", or a parallel statement

解析:最后上了endmodule。一般编程的程序长了,到最后也就容易忘记。

7.Error (10278): Verilog HDL Port Declaration error at ir_ctrl.v(11): input port "ir" cannot be declared with type "<a variable data type, e.g. reg>"

解析:在Altra官网中就有该解释 http://www.altera.com.cn/support/kdb/solutions/rd03102006_162.html 官网上有很多东西值得我们发现学习。

8.Error (10137): Verilog HDL Procedural Assignment error at test.v(24): object "check_9ms" on left-hand side of assignment must have a variable data type

解析:在Altra官网中就有该解释 http://www.altera.com.cn/support/kdb/solutions/rd06232003_8783.html

9.Error (10219): Verilog HDL Continuous Assignment error at clk_div.v(26): object "clkdiv_equ" on left-hand side of assignment must have a net type

解析:看得懂英语就懂了。

10.Error (10200): Verilog HDL Conditional Statement error at clk_div.v(22): cannot match operand(s) in the condition to the corresponding edges in the enclosing event control of the always construct

解析:看看官网的解释http://www.altera.com.cn/support/kdb/solutions/rd06242003_6128.html

11.Error (10231): Verilog HDL error at LCD1602.v(40): value cannot be assigned to input "lcd_en"

解析:端口设置出错

12.Error (10137): Verilog HDL Procedural Assignment error at LCD1602.v(49): object "lcd_rs" on left-hand side of assignment must have a variable data type

解析:http://www.altera.com.cn/support/kdb/solutions/rd06232003_8783.html

13.Error (10170): Verilog HDL syntax error at test_vga.v(57) near text "<"; expecting "<=", or "="

 

即这里产生的错误。

解析:一个空格,不小心分开了,而且有人喜欢把<=分开来写,这个在QUANRUS是不允许的呃。。。

14.Error: Application nios2-terminal on 127.0.0.1 is using the target device

解析:这种情况出现在JTAG模式下,你在使用NIOS下的JTAG功能(比如利用BLASTER进行在线仿真),同时你又想下载*.sof文件(就是在JTAG模式下下载程序)。简单说就是你的JTAG已经被占用了。解决办法就是关闭你正在使用的JTAG功能,然后再下载*.sof文件。初学者经常会犯这样的错误,一定要注意。

这里有http://www.cnblogs.com/kingst/archive/2010/05/04/1727613.html

待续
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: