按照Verilog源程序写法如下:
module shift;
reg [3:0]start,result;
initial;
begin;
start = 1;
result = (start<<2);
end
endmodule
Transcript 命令行中用vlog 指令进行编译,
显示如下错误

参考文章:
verilog error:syntax error-Is there a missing '::'? - nuomiphp
修改代码,加入关键词assgin
module shift;
reg [3:0]start,result;
initial;
begin;
assign start = 1;
assign result = (start<<2);
end
endmodule
再编译:
vlog 文件名.v

通过编译。

最后
以上就是迅速滑板最近收集整理的关于Modelsim 报错 near “=“: syntax error, unexpected ‘=‘.的全部内容,更多相关Modelsim内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复