1、编译报错:Illegal digit for specified base in numeric constant.(数值常量中指定基数的非法数字)
排查问题:3‘d4 写成了 3’b4
2、编译警告:Warning (10230): Verilog HDL assignment warning at top_module.v(56): truncated value with size 32 to match size of target (1) (没有指定位宽,系统会自动分配32位)
比如在赋值时:
assign aaah = (state == DIE) ? 0 : (state == DOWN_L) | (state == DOWN_R);
数字 0 没有指定位宽,会默认 32 位,改正 1'b0 就可以了
assign aaah = (state == DIE) ? 1'b0 : (state == DOWN_L) | (state == DOWN_R);