问题
vcs 仿真时 filelist 中增加 +incdir+${dir},该指令用于指明 rtl 中 `include 的文件路径,假设文件层次如下:
|- rtl
| |- dut.v
|- head
| |- def.vh
|- sim
| |- filelist.f
| |- tb.v
| |- makefile
其中 filelist.f 的内容如下:
./tb.v
../rtl/dut.v
+incdir+../head/
tb.v 中包含一句 include :
`include "def.vh"
module tb();
...
endmodule
makefile 中注意要在 vcs 命令后用 -f ./filelist 指明filelist。
这时filelist 中各路径都正确,但执行 vcs 仿真,会报找不到 def.vh 。
原因及解决方法
filelist 中的路径可以是相对路径也可以是绝对路径,包括 ${dir} 。
vcs 找不到路径的原因是 filelist 中 +incdir+${dir} 中的路径 ${dir} 结尾有斜杠 “/”。
将 filelist.f 的内容改一下即可:
./tb.v
../rtl/dut.v
+incdir+../head
7744

被折叠的 条评论
为什么被折叠?



