首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用iverilog进行语法检查

使用iverilog进行语法检查
EN

Stack Overflow用户
提问于 2019-08-18 08:36:08
回答 1查看 337关注 0票数 0

我想运行iverilog来检查我文件中的语法。我不希望它实际编译任何东西,因为我正在处理一个很大的代码库,并且不想找到并“包含”所有包含的文件。

代码语言:javascript
复制
`include "header.vh"   // not a file in current dir so iverilog can't find it

module test;
input a;
input b;
output c;

assign c = a & b   // missed a semicolon - wanna use iverilog to tell me this

assign d = a + XMR.TO.ANOTHER.MODULE.d;    // Want iverilog to ignore the XMR and move on since there's no syntax issue here

// no endmodule - should also be reported by iverilog

我尝试过的命令:

代码语言:javascript
复制
iverilog -t null -Wall test.v

请帮我找到一个解决方案。即使你可以给我一个不同的工具,那也太好了。

EN

回答 1

Stack Overflow用户

发布于 2019-08-18 12:43:18

您应该只使用`include来包含编译后面的代码所需的文件。Verilog不要求首先编译交叉引用的模块。

相反,应向编译器提供要编译的文件列表。然后,您应该能够使用任何工具只编译其中一个文件,并获得您正在搜索的语法错误。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57540870

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档