verilog - 为什么verilog验证文件不是模块形式的?

标签 verilog verification

为什么 Verilog 验证文件不是模块形式的? 我看到的文件仅以 initial begin 开头,有些文件名使用 .inc 扩展名。

最佳答案

将任意内容的文件包含到 Verilog 模块中是很常见的。这是使用 `include 编译器指令完成的,如 IEEE Std 1800-2012,“22.4 `include” 部分所述:

The file inclusion (include) compiler directive is used to insert the entire contents of a source file in another file during compilation. The result is as though the contents of the included source file appear in place of the `include compiler directive.

它对于在不同模块之间共享公共(public)代码非常有用:参数、定义宏、任务、函数等。

一般来说,.inc 文件扩展名并不特殊。这可能是某些模拟工具使用的约定。

关于verilog - 为什么verilog验证文件不是模块形式的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30727199/

相关文章:

emacs - 修改verilog模式缩进

verilog - 警告 :Instantiation depth might indicate recursion in ModelSim

verilog - 在 systemverilog 中不使用程序 block 来避免竞争条件

verilog - 我们可以有一系列自定义模块吗?

email - 确定电子邮件地址的健康/有效性

authentication - 其他用户注册/授权方法?

vhdl - AXI4 Lite 从 IP

javascript - 我如何通过 JavaScript 或 JQuery 或...验证所有选择框都有一个选定的选项?

ios - 使用 Swift 和 Parse 在 Bool 上使用 '==' 检查用户验证会抛出错误

amazon-web-services - 无需电子邮件或电话即可确认 AWS Cognito 用户