项目场景:
场景描述:在linux环境用vcs+verdi跑uvm的一个测试用例
问题描述:
报错代码如下:
filelist:11: warning: overriding recipe for target `uvm_dpi.o'
filelist:7: warning: ignoring old recipe for target `uvm_dpi.o'
filelist:13: warning: overriding recipe for target `uvm_dpi.d'
filelist:9: warning: ignoring old recipe for target `uvm_dpi.d'
filelist:11: warning: overriding recipe for target `uvm_dpi.o'
filelist:7: warning: ignoring old recipe for target `uvm_dpi.o'
filelist:13: warning: overriding recipe for target `uvm_dpi.d'
filelist:9: warning: ignoring old recipe for target `uvm_dpi.d'
rm -f _csrc*.so pre_vcsobj_*.so share_vcsobj_*.so
filelist:11: warning: overriding recipe for target `uvm_dpi.o'
filelist:7: warning: ignoring old recipe for target `uvm_dpi.o'
filelist:13: warning: overriding recipe for target `uvm_dpi.d'
filelist:9: warning: ignoring old recipe for target `uvm_dpi.d'
g++ -w -pipe -DVCS -DUVM_DPI_DO_TYPE_CHECK -fPIC -DVCS -O -I/EDA/synopsys/vcs-mx/O-2018.09-SP2/include -c /EDA/synopsys/vcs-mx/O-2018.09-SP2/etc/uvm-1.2/dpi/uvm_dpi.cc
g++ -w -pipe -DVCS -DUVM_DPI_DO_TYPE_CHECK -fPIC -DVCS -O -I/EDA/synopsys/vcs-mx/O-2018.09-SP2/include -c /EDA/synopsys/vcs-mx/O-2018.09-SP2/etc/uvm-1.2/verdi/dpi/uvm_verdi_dpi.cpp
gcc -w -pipe -DVCS -DUVM_DPI_DO_TYPE_CHECK -fPIC -DVCS -O -I/EDA/synopsys/vcs-mx/O-2018.09-SP2/include -fPIC -c -o uM9F1_0x2aB.o uM9F1_0x2aB.c
if [ -x ../simv ]; then chmod -x ../simv; fi
g++ -o ../simv -Wl,-rpath-link=./ -Wl,-rpath='$ORIGIN'/simv.daidir/ -Wl,-rpath=./simv.daidir/ -Wl,-rpath='$ORIGIN'/simv.daidir
uvm_dpi.o: In function `m_uvm_report_dpi':
uvm_dpi.cc:(.text+0x96): multiple definition of `m_uvm_report_dpi'
uvm_dpi.o:uvm_dpi.cc:(.text+0x96): first defined here
uvm_dpi.o: In function `int_str_max':
uvm_dpi.cc:(.text+0x275): multiple definition of `int_str_max'
uvm_dpi.o:uvm_dpi.cc:(.text+0x275): first defined here
uvm_dpi.o: In function `uvm_re_match':
uvm_dpi.cc:(.text+0x2a0): multiple definition of `uvm_re_match'
uvm_dpi.o:uvm_dpi.cc:(.text+0x2a0): first defined here
uvm_dpi.o: In function `uvm_glob_to_re':
uvm_dpi.cc:(.text+0x500): multiple definition of `uvm_glob_to_re'
uvm_dpi.o:uvm_dpi.cc:(.text+0x500): first defined here
uvm_dpi.o: In function `uvm_dump_re_cache':
uvm_dpi.cc:(.text+0x78f): multiple definition of `uvm_dump_re_cache'
uvm_dpi.o:uvm_dpi.cc:(.text+0x78f): first defined here
uvm_dpi.o: In function `uvm_memory_load':
uvm_dpi.cc:(.text+0x7c2): multiple definition of `uvm_memory_load'
uvm_dpi.o:uvm_dpi.cc:(.text+0x7c2): first defined here
uvm_dpi.o: In function `uvm_hdl_check_path':
uvm_dpi.cc:(.text+0x7e1): multiple definition of `uvm_hdl_check_path'
uvm_dpi.o:uvm_dpi.cc:(.text+0x7e1): first defined here
uvm_dpi.o: In function `uvm_hdl_btoi':
uvm_dpi.cc:(.text+0x7fd): multiple definition of `uvm_hdl_btoi'
uvm_dpi.o:uvm_dpi.cc:(.text+0x7fd): first defined here
uvm_dpi.o: In function `uvm_hdl_dtob':
uvm_dpi.cc:(.text+0x938): multiple definition of `uvm_hdl_dtob'
uvm_dpi.o:uvm_dpi.cc:(.text+0x938): first defined here
uvm_dpi.o: In function `uvm_hdl_read_string':
uvm_dpi.cc:(.text+0x9ce): multiple definition of `uvm_hdl_read_string'
uvm_dpi.o:uvm_dpi.cc:(.text+0x9ce): first defined here
uvm_dpi.o: In function `uvm_hdl_read':
uvm_dpi.cc:(.text+0x9ed): multiple definition of `uvm_hdl_read'
uvm_dpi.o:uvm_dpi.cc:(.text+0x9ed): first defined here
uvm_dpi.o: In function `uvm_hdl_deposit':
uvm_dpi.cc:(.text+0xc24): multiple definition of `uvm_hdl_deposit'
uvm_dpi.o:uvm_dpi.cc:(.text+0xc24): first defined here
uvm_dpi.o: In function `uvm_hdl_force':
uvm_dpi.cc:(.text+0xc37): multiple definition of `uvm_hdl_force'
uvm_dpi.o:uvm_dpi.cc:(.text+0xc37): first defined here
uvm_dpi.o: In function `uvm_hdl_release_and_read':
uvm_dpi.cc:(.text+0xc4a): multiple definition of `uvm_hdl_release_and_read'
uvm_dpi.o:uvm_dpi.cc:(.text+0xc4a): first defined here
uvm_dpi.o: In function `uvm_hdl_release':
uvm_dpi.cc:(.text+0xc5d): multiple definition of `uvm_hdl_release'
uvm_dpi.o:uvm_dpi.cc:(.text+0xc5d): first defined here
uvm_dpi.o: In function `push_data':
uvm_dpi.cc:(.text+0xc73): multiple definition of `push_data'
uvm_dpi.o:uvm_dpi.cc:(.text+0xc73): first defined here
uvm_dpi.o:(.bss+0x10): multiple definition of `argc_total'
uvm_dpi.o:(.bss+0x10): first defined here
uvm_dpi.o:(.bss+0x0): multiple definition of `argv_ptr'
uvm_dpi.o:(.bss+0x0): first defined here
uvm_dpi.o: In function `walk_level':
uvm_dpi.cc:(.text+0xc97): multiple definition of `walk_level'
uvm_dpi.o:uvm_dpi.cc:(.text+0xc97): first defined here
uvm_dpi.o: In function `uvm_dpi_get_next_arg_c':
uvm_dpi.cc:(.text+0xd60): multiple definition of `uvm_dpi_get_next_arg_c'
uvm_dpi.o:uvm_dpi.cc:(.text+0xd60): first defined here
uvm_dpi.o:(.bss+0x8): multiple definition of `argv_stack'
uvm_dpi.o:(.bss+0x8): first defined here
uvm_dpi.o: In function `uvm_dpi_get_tool_name_c':
uvm_dpi.cc:(.text+0xe26): multiple definition of `uvm_dpi_get_tool_name_c'
uvm_dpi.o:uvm_dpi.cc:(.text+0xe26): first defined here
uvm_dpi.o: In function `uvm_dpi_get_tool_version_c':
uvm_dpi.cc:(.text+0xe3c): multiple definition of `uvm_dpi_get_tool_version_c'
uvm_dpi.o:uvm_dpi.cc:(.text+0xe3c): first defined here
uvm_dpi.o: In function `uvm_dpi_regcomp':
uvm_dpi.cc:(.text+0xe52): multiple definition of `uvm_dpi_regcomp'
uvm_dpi.o:uvm_dpi.cc:(.text+0xe52): first defined here
uvm_dpi.o: In function `uvm_dpi_regexec':
uvm_dpi.cc:(.text+0xf10): multiple definition of `uvm_dpi_regexec'
uvm_dpi.o:uvm_dpi.cc:(.text+0xf10): first defined here
uvm_dpi.o: In function `uvm_dpi_regfree':
uvm_dpi.cc:(.text+0xf39): multiple definition of `uvm_dpi_regfree'
uvm_dpi.o:uvm_dpi.cc:(.text+0xf39): first defined here
/usr/bin/ld: cannot find -lca-override_timescale=1ns/100ps
collect2: error: ld returned 1 exit status
make[1]: *** [product_timestamp] Error 1
make[1]: Leaving directory `/project/UVM_AXI_TEST/csrc'
Make exited with status 2
CPU time: 11.309 seconds to compile + .334 seconds to elab + .372 seconds to link
Verdi KDB elaboration done and the database successfully generated: 0 error(s), 0 warning(s)
make: *** [comp] Error 2
原因分析:
应该是uvm的编译库里某个模块被重复编译或者重复加载了。原本报错的makefile中该部分为:
comp:
vcs \
-override_timescale=1ns/1ps \
-full64 \
-sverilog \
-debug_access+all \
-P ${NOVAS_HOME}/share/PLI/VCS/LINUX64/novas.tab \
${NOVAS_HOME}/share/PLI/VCS/LINUX64/pli.a \
+notimingcheck \
+nospecify \
+v2k \
+vcs+flush+all \
-ntb_opts uvm-1.2 \
+acc \
+vpi \
+define+UVM_OBJECT_MUST_HAVE_CONSTRUCTOR \
+incdir+$(UVM_HOME)/src \
+incdir+$(UVM_HOME)/src/uvm.sv \
${UVM_HOME}/src/dpi/uvm_dpi.cc -CFLAGS -DVCS \
$(ALL_DEFINE) \
$(CM) \
$(CM_NAME) \
$(CM_DIR) \
$(VPD_NAME) \
-o $(OUTPUT) \
-l ./LOG/compile.log \
-f ./flist_SIM.f
我猜可能是 -ntb_opts uvm-1.2 \ 已经将UVM的全部编译库的文件都已经使能包含了,所以后面就不能再添加UVM的编译库的路径?如果有哪位大佬知道其中缘由,请指教。
解决方案:
将makefile里的这些行删除:
+incdir+$(UVM_HOME)/src \
+incdir+$(UVM_HOME)/src/uvm.sv \
${UVM_HOME}/src/dpi/uvm_dpi.cc -CFLAGS -DVCS \
新的makefile的com部分为:
comp:
vcs \
-override_timescale=1ns/1ps \
-full64 \
-sverilog \
-debug_access+all \
-P ${NOVAS_HOME}/share/PLI/VCS/LINUX64/novas.tab \
${NOVAS_HOME}/share/PLI/VCS/LINUX64/pli.a \
+notimingcheck \
+nospecify \
+v2k \
+vcs+flush+all \
-ntb_opts uvm-1.2 \
+acc \
+vpi \
+define+UVM_OBJECT_MUST_HAVE_CONSTRUCTOR \
$(ALL_DEFINE) \
$(CM) \
$(CM_NAME) \
$(CM_DIR) \
$(VPD_NAME) \
-o $(OUTPUT) \
-l ./LOG/compile.log \
-f ./flist_SIM.f
这样就没报错了
|