在使用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...
通过如下方式找到真实的地方:
- 设置环境变量
source ~/apps/xilinx/SDK/2017.4/settings64.sh
- 进入elaborate 所在目录,例如
/tmp/xlsimuCWk1A/hdl_netlist/xelab.sim/sim_1/behav/xsim
- 运行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
- 复制上面的命令行,添加-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