Verilog编译报错:expecting the keyword ‘module’ or 'primitive’等 原因 可能是该代码片段没有包含在module中。 解决 在代码首尾添加module和endmodule的相关代码即可。