我初學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