学习verilogDHL问题笔记-Quartus常见错误.doc
2页学习verilog DHL问题笔记——Quartus常见错误我初学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 ""解析:在Altra官网中就有该解释 官网上有很多东西值得我们发现学习。
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官网中就有该解释 (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解析:看看官网的解释 (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解析: (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文件初学者经常会犯这样的错误,一定要注意。





