UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor dgutierr
Visitor
770 Views
Registered: ‎02-09-2018

Vivado simulator with DPI does not work in Debian9

When I Run the demo that ships with Vivado simulator "simple_import" to test DPI-C in Debian 9 (or perhaps any linux distribution that uses GNU GCC 6) The simulation fails with the error below:

 

sh run.csh
Multi-threading is on. Using 46 slave threads.
Running compilation flow
Done compilation
Done linking: "/mathworks/home/dgutierr/Documents/tmp/simple_import/xsim.dir/xsc/dpi.so"
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/mathworks/home/dgutierr/Documents/tmp/simple_import/file.sv" into library work
INFO: [VRFC 10-311] analyzing module m
Vivado Simulator 2017.2
Copyright 1986-1999, 2001-2016 Xilinx, Inc. All Rights Reserved.
Running: /mathworks/hub/share/apps/HDLTools/Vivado/2017.2-mw-0/Lin/bin/unwrapped/lnx64.o/xelab work.m -sv_lib dpi -R 
Multi-threading is on. Using 46 slave threads.
WARNING: [XSIM 43-3431] One or more environment variables have been detected which affect the operation of the C compiler. These are typically not set in standard installations and are not tested by Xilinx, however they may be appropriate for your system, so the flow will attempt to continue.  If errors occur, try running fuse with the "-mt off -v 1" switches to see more information from the C compiler. The following environment variables have been detected:
    LIBRARY_PATH
Starting static elaboration
Completed static elaboration
Starting simulation data flow analysis
Completed simulation data flow analysis
Time Resolution for simulation is 1ps
Compiling module work.m
/usr/bin/ld: xsim.dir/work.m/obj/xsim_2.lnx64.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
ERROR: [XSIM 43-3238] Failed to link the design.

 

I think Vivado Simulator is not compiling the binaries with -fPIC , is there any way to force it to use this flag?, or force it to use the distribution compiler? (I believe it uses CLang)

Tags (2)
0 Kudos
1 Reply
Moderator
Moderator
737 Views
Registered: ‎09-15-2016

Re: Vivado simulator with DPI does not work in Debian9

HI @dgutierr,

 

The Debian9 is unsupported OS with Vivado 2017.2. Please refer the below user guide page#8 for the supported OS information:

 

https://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_2/ug973-vivado-release-notes-install-license.pdf  

 

Hence can you please try using supported OS and try passing “-cc gcc”  to xelab and see if this helps.

 

Thanks & Regards,
Sravanthi B

 

-----------------------------------------------------------------------------------------------
Please mark the appropriate post as an answer "Accept as solution" in case it helps to resolve your query.
Give Kudos to a post which you think is helpful and reply oriented.
-----------------------------------------------------------------------------------------------

Thanks & Regards,
Sravanthi B
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos