我是靠谱客的博主 迅速滑板,这篇文章主要介绍Modelsim 报错 near “=“: syntax error, unexpected ‘=‘.,现在分享给大家,希望可以做个参考。

按照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内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(1086)

评论列表共有 0 条评论

立即
投稿
返回
顶部