VCS报告错误:Error-[SFCOR] Source file cannot be opened

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

问题信息:

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"

更改为<

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值