编译错误
-
Error (10161): Verilog HDL error at work2.v(1): object “B” is not
declared. Verify the object name is correct. If the name is correct,
declare the object.原因:数据类型定义错误 或者 赋值类型错误
解决方法: 在always 过程块中被赋值的变量必须是 reg (寄存器型),用assign 连续赋值的对象 必须定义成 wire(线型)
仿真错误:
-
(vsim-3053) D:/IntelFPGA/FPGA/work2/work2_tb.vt(5): Illegal output
or inout port connection for port ‘B’原因:tb文件端口顺序与module不一致 或 数据类型定义错误
-
** Error: (vlog-13069) D:/IntelFPGA/FPGA/work2/work2_tb.vt(9): near “=”: syntax error, unexpected ‘=’.
原因:initial过程块内包含了多条行为语句,需要将这些语句组成一组,一般是使用关键字begin和end将它们组合为一个块语句;如果块内只有一条语句,则不必使用begin和end
-
** Error: D:/IntelFPGA/FPGA/work2/work2_tb.vt(9): (vlog-13205) Syntax error found in the scope following ‘inb’. Is there a missing
‘::’?注:与Error: (vlog-13069) 一起出现
原因:initial过程块内包含了多条行为语句,需要将这些语句组成一组