在设置中已经配置了
set RTL_INC_PATH ../../eda/rtl/include
set_app_var search_path [list . $search_path $RTL_INC_PATH]
综合时提示错误
Running PRESTO HDLC
Compiling source file ../../eda/rtl/spi/spi_top.v
Opening include file spi_inc.vh
Error: ../../eda/rtl/spi/spi_top.v:1: Unable to open file `spi_inc.vh': No such file or directory. (VER-41)
*** Presto compilation terminated with 1 errors. ***
而spi_inc.vh文件确实是在…/…/eda/rtl/include目录下。
出现这个问题的原因是源代码project/xxx/rtl是个软连接,在我的综合脚本里
sh cp ~/project/xxx/rtl …/…/eda
是把软连接复制到了eda目录下,而design compiler对软连接支持有限。
[xxx@localhost $ll ~/project/xxx/rtl
4.0K lrwxrwxrwx 1 xxx xxx 56 05-13 18:37 /home/xxx/project/xxx/rtl ->/mnt/hgfs/D_pan/xxx/project/rtl/
[xxx@localhost $ll ../../eda/rtl
4.0K lrwxrwxrwx 1 xxx xxx 56 05-13 18:37 ../../eda/rtl ->/mnt/hgfs/D_pan/xxx/project/rtl/
解决办法就是复制源代码时不要复制软连接,而是复制原文件
脚本里的命令改为:
sh cp ~/project/xxx/rtl/ ../../eda
两条命名的差别就是rtl后多了一个斜杠/