verilog常見錯誤列表


Error/Warning 來源:https://hdlbits.01xz.net/wiki/ 題目:

 

1、Quartus Warning 10235:

Warning (10235): Verilog HDL Always Construct warning at FM_mod.v(23): variable "carry_freq" is read inside the Always Construct but isn't in the Always Construct's Event Control

Warning原因:由於always過程塊敏感列表中未完全包含過程塊中使用的所有變量;

常見來源:常見於組合邏輯的always過程塊中;

解決方法:將always過程塊中的敏感列表改為 ‘ * ’ | 將敏感列表改為邊沿觸發; 

 

 

2、邏輯表達式中的括號:

正確:

module fadd_correct( input a, b, cin, output cout, sum ); assign sum = a ^ b ^ cin; assign cout = (a & b) | ((a ^ b) & cin); endmodule

 

 

錯誤:

module fadd_wrong( input a, b, cin, output cout, sum ); assign sum = a ^ b ^ cin; assign cout = (a & b) | (a ^ b & cin); endmodule

 

 

 

3、時序邏輯中的case語句:


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM