Cosimulation fails with XSI error: Vivado Simulink HDL Simulation

21 views (last 30 days)
When I try to set up a simulation model, either with HDL Workflow Advisor or through the Cosimulation Wizard (with the HDL files generated from the Simulink model), I'm not able to run the simulation and get the following error:
Error reported by S-function 'shdlcosimxsi' in 'gm_simple_filt_test_vs/HDL_DUT_vs/S-Function': Could not create XSI loader object. The HDL design DLL or Vivado Simulator kernel libraries could not be properly loaded. Ensure the design DLL has been created at xsim.dir/design/xsimk.so and the Xilinx kernel libraries librdi_simulator_kernel.so can be found. Saw following std::exception: ISim engine error: Failed to Load up XSI.
Might this be a Vivado version incompatibility error, or is it a simple setup error I missed? I'm working with ADI boards that require an unsupported version but am able to still generate a bitstream when selecting "Allow unsupported version". I'm just unsure if this approach still works for cosimulation... trying to narrow down the root of the issue. I had issues when trying to set up the LD_LIBRARY_PATH variable in the command line (clashing with MATLAB libraries, so instead I used setenv() to set the path within MATLAB.
I am using Linux (ubuntu 20.04), MATLAB R2021b/R2022b, Vivado 2021.1. Thanks in advance!

Accepted Answer

Sreeram
Sreeram on 5 May 2025
Hi Ezenia,
The error regarding the inability to create the XSI loader object typically occurs due to either missing Vivado libraries or a version incompatibility.
Based on the information provided, it appears that LD_LIBRARY_PATH was not set prior to launching MATLAB, but was instead modified within MATLAB using "setenv()". Unfortunately, for HDL cosimulation with Vivado, LD_LIBRARY_PATH must be set in the shell before MATLAB is launched. This is necessary because Simulink and the cosimulation S-function require access to the correct environment at MATLAB startup; modifying the variable within MATLAB does not resolve the issue, as the relevant libraries are already loaded. For more details, please refer to the "Set up for Cosimulation with Vivado" section in the documentation:
The other thing to keep in mind is Vivado version compatibility. MATLAB R2021b officially supports Vivado 2020.1, and R2022b supports Vivado 2020.2. Using Vivado 2021.1 is not officially supported and may lead to unexpected issues.
Hope this clarifies!
Thanks,
Sreeram
  1 Comment
Ezenia
Ezenia on 5 May 2025
Thank you, Sreeram!
I had some suspicion that it was due to version incompatibility. I had followed the instructions on the page you referenced here but then MATLAB would randomly start to crash and I would see an error message in my terminal regarding missing libraries or files. I'm kind of stuck using this Vivado/MATLAB version for some ADI boards I'm using, so I'll just assume that cosimulation with Simulink isn't supported, just HDL development.
-Ezenia

Sign in to comment.

More Answers (0)

Products


Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!