I have a problem simulating test benches containing DPI-C imports. Here is a method for reusing MATLAB functional model of the DUT in a SystemVerilog testbench. I downloaded all the code for this example from this address on Mathworks. Then I successfully ran 'build_dpi.m' in MATLAB 2022a with no warnings/errors. Finally, when I run sim.do in Questasim-64 2021.1, I get the following list of warnings:
# ** Warning: (vsim-3770) Failed to find user specified function 'DPI_fft_checker_initialize' in DPI precompiled library search list ".\codegen/dll/fft_checker/libfft_checker_dpi.dll .\codegen/dll/gen_wave/libgen_wave_dpi.dll C:/questasim64_2021.1/uvm-1.1d\win64\uvm_dpi.dll ".
# ** Warning: (vsim-3770) Failed to find user specified function 'DPI_fft_checker' in DPI precompiled library search list ".\codegen/dll/fft_checker/libfft_checker_dpi.dll .\codegen/dll/gen_wave/libgen_wave_dpi.dll C:/questasim64_2021.1/uvm-1.1d\win64\uvm_dpi.dll ".
# ** Warning: (vsim-3770) Failed to find user specified function 'DPI_gen_wave_initialize' in DPI precompiled library search list ".\codegen/dll/fft_checker/libfft_checker_dpi.dll .\codegen/dll/gen_wave/libgen_wave_dpi.dll C:/questasim64_2021.1/uvm-1.1d\win64\uvm_dpi.dll ".
# ** Warning: (vsim-3770) Failed to find user specified function 'DPI_gen_wave' in DPI precompiled library search list ".\codegen/dll/fft_checker/libfft_checker_dpi.dll .\codegen/dll/gen_wave/libgen_wave_dpi.dll C:/questasim64_2021.1/uvm-1.1d\win64\uvm_dpi.dll ".
Finally, the simulation is aborted with the following error:
** Fatal: (vsim-160) fft_pkg.sv(120): Null foreign function pointer encountered when calling 'DPI_fft_checker_initialize'
I would highly appreciate some guidance on how to solve this problem. I'm working on integration of my MATLAB models into my SV simulations and I'm stuck here with this problem. Thank you very much