Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

SV DPI - C code that uses a shared lib

Status
Not open for further replies.

avigailr

Newbie level 1
Joined
Jan 22, 2018
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
33
Hi,

I'm trying to use a DPI-C function in my SV env (creating a dpi.so lib and running it using VCS):



"vcs -debug_all -full64 -sverilog -R file.sv dpi.so"



This works fine for "basic" C functions.



Now my "dpi.so" library contain a function that uses another shared library, say utils.so (The reason for using it, is that utils.so contains some functions I need to use, supplied by 3rd party, but the argument they accept are structs defined in C header file).

When I try compiling it I get the following error:

PHP:
vcs -debug_all -full64 -sverilog -R file.sv  utils.so dpi.so

And get the compilation error:


PHP:
/usr/bin/ld: warning: librdi_commoncwebtalk.so, needed by /opt/Xilinx/Vivado/2017.1/lib/lnx64.o/librdi_simulator_kernel.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: librdizlib.so, needed by /opt/Xilinx/Vivado/2017.1/lib/lnx64.o/librdi_simulator_kernel.so, not found (try using -rpath or -rpath-link)
/opt/Xilinx/Vivado/2017.1/lib/lnx64.o/librdi_simulator_kernel.so: undefined reference to `std::thread::_State::~_State()@GLIBCXX_3.4.22'
/opt/Xilinx/Vivado/2017.1/lib/lnx64.o/librdi_simulator_kernel.so: undefined reference to `uncompress'
/opt/Xilinx/Vivado/2017.1/lib/lnx64.o/librdi_simulator_kernel.so: undefined reference to `compress2'
/opt/Xilinx/Vivado/2017.1/lib/lnx64.o/librdi_simulator_kernel.so: undefined reference to `typeinfo for std::thread::_State@GLIBCXX_3.4.22'
/opt/Xilinx/Vivado/2017.1/lib/lnx64.o/librdi_simulator_kernel.so: undefined reference to `std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())@GLIBCXX_3.4.22'
/opt/Xilinx/Vivado/2017.1/lib/lnx64.o/librdi_simulator_kernel.so: undefined reference to `IDT::WebTalk::send(char const*, IDT::WebTalk::ProductType)'
/opt/Xilinx/Vivado/2017.1/lib/lnx64.o/librdi_simulator_kernel.so: undefined reference to `IDT::WebTalk::add(char const*, char const*, IDT::WebTalk::SectionType)'
/opt/Xilinx/Vivado/2017.1/lib/lnx64.o/librdi_simulator_kernel.so: undefined reference to `IDT::WebTalk::internal()'



when I try compiling for C++:

PHP:
vcs -lstdc++ -cpp  -debug_all -full64 -sverilog -R file.sv  libIp_xfft_v9_0_bitacc_cmodel.so dpi.so



And got the following:



PHP:
make: full64: Command not found
Makefile:107: recipe for target 'product_timestamp' failed
make: [product_timestamp] Error 127 (ignored)
../simv up to date

Error-[EXEC_NEX] Cannot run executable
  Cannot run executable 'simv' ; either it does not exist or not executable.
  Use -o <exe_name> if different than simv.



How can I compile a DPI when the C code uses another shared lib?

Does anyone have any experience in using this C model supplied by Xilinx IP for verification in SV?




Thanks :)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top