问题信息:
VCS版本:Version L-2016.06_Full64
报错内容:
Error-[SFCOR] Source file cannot be opened
Source file "../../pre_sim/rtl/defines.v" cannot be opened for reading due
to 'No such file or directory'.
Please fix above issue and compile again.
"../../../pre_sim/tb/single_data_sync_tran.v", 14
Source info: `include "../../pre_sim/rtl/defines.v"
1 error
出现该问题的环境是我在调用某一个tb.v代码时,需要把defines.v文件也include进去。
`timescale 1ns/1ns
`include "../../pre_sim/rtl/defines.v"
module single_data_sync_tran(
input clk,
input rst_n,
input data_sync_tran_en,
input [38:0] ctrl_data,
output ctrl_bit,
output fsync,
output lsync
);
明明我的路径相对于该tb文件本身是正确的,为什么还会报错呢?
问题原因
原因是VCS在检查.v文件中的include时,是以VCS命令被执行的路径为参考的,而不是以tb文件所在的路径为参考的,如果我将上图中的
`include "../../pre_sim/rtl/defines.v"
更改为<

文章讲述了在使用VCS编译器时遇到的错误,由于VCS以执行命令的路径而非TB文件路径查找include的文件,导致找不到defines.v。解决方案是移除TB中的include,将define文件路径写入file.f并在VCS命令中指定。
218

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



