One solution to error: “Failed to compile generated C file xsim.dir/ ... /xsim_1.c“

在使用vivado进行post timing simulation时,会出现如下报错:

ERROR: [XSIM 43-3409] Failed to compile generated C file xsim.dir/cmpy_v6_control_b026c1cb9d0f3349afc505b487268840_behav/obj/xsim_1.c.
ERROR: [XSIM 43-3915] Encountered a fatal error. Cannot continue. Exiting...

通过如下方式找到真实的地方:

  1. 设置环境变量
source ~/apps/xilinx/SDK/2017.4/settings64.sh
  1. 进入elaborate 所在目录,例如
/tmp/xlsimuCWk1A/hdl_netlist/xelab.sim/sim_1/behav/xsim
  1. 运行elaborate.sh
./elaborate.sh

elaborate.sh 最终会运行

xelab -wto 38b04a6a34d44e6991b3b61d4c3cc3bb --incr --debug off --dll --relax --mt 8 -L axi_utils_v2_0 -L xbip_utils_v3_0 -L mult_gen_v12_0 -L cmpy_v6_0 -L xbip_pipe_v3_0 -L work -L unisims_ver -L unimacro_ver -L secureip -L xpm --snapshot cmpy_v6_control_b026c1cb9d0f3349afc505b487268840_behav work.cmpy_v6_control_b026c1cb9d0f3349afc505b487268840 work.glbl -log elaborate.log
  1. 复制上面的命令行,添加-v 2,运行
xelab -wto 38b04a6a34d44e6991b3b61d4c3cc3bb --incr --debug off --dll --relax --mt 8 -L axi_utils_v2_0 -L xbip_utils_v3_0 -L mult_gen_v12_0 -L cmpy_v6_0 -L xbip_pipe_v3_0 -L work -L unisims_ver -L unimacro_ver -L secureip -L xpm --snapshot cmpy_v6_control_b026c1cb9d0f3349afc505b487268840_behav work.cmpy_v6_control_b026c1cb9d0f3349afc505b487268840 work.glbl -log elaborate.log -v 2

~/apps/xilinx/Vivado/2017.4/data/../tps/llvm/3.1/lnx64.o/bin/clang: ~/apps/xilinx/Vivado/2017.4/lib/lnx64.o/SuSE/libtinfo.so.5: no version information available (required by /lib64/libncurses.so.5)
~/apps/xilinx/Vivado/2017.4/data/../tps/llvm/3.1/lnx64.o/bin/clang: relocation error: /lib64/libncurses.so.5: symbol _nc_putchar_sp, version NCURSES_TINFO_5.9.20150530 not defined in file libtinfo.so.5 with link time reference
ERROR: [XSIM 43-3409] Failed to compile generated C file xsim.dir/cmpy_v6_control_b026c1cb9d0f3349afc505b487268840_behav/obj/xsim_1.c.
ERROR: [XSIM 43-3915] Encountered a fatal error. Cannot continue. Exiting...

可以发现真实的原因是缺少了libncurses库。

参考

https://forums.xilinx.com/t5/Simulation-and-Verification/One-solution-to-error-quot-Failed-to-compile-generated-C-file/td-p/865415

评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值