using a dpigen with a mexfile inside it

3 Ansichten (letzte 30 Tage)
nadav
nadav am 1 Jan. 2025
Kommentiert: nadav am 5 Jan. 2025
hi
i am trying to generate a dpi-c with the matlab dpigen.
inside my code i have a matlab interface that he came from vivado model c. for simulation the ip code of an fft.
when i am trying to create the dpi, i am getting the following error:
Function call resolved to MEX file 'C:\CMODEL_FFT\xfft_v9_1_bitacc_mex.mexw64'. Only MATLAB files are
supported for code generation. Consider using coder.extrinsic to declare MEX function as extrinsic.
how can i create the dpi with this mex file inside the matlab code?
or how can i over come this error?

Antworten (1)

praguna manvi
praguna manvi am 2 Jan. 2025
Hi @nadav,
I see that you are looking to include external C/C++ function calls compiled as a MEX file for standalone code generation using "dpigen". To include these calls in code generation, you can consider using "coder.ceval", which calls the C/C++ function specified in "functionName" from the generated code. For more information, refer to:
To understand more about when code generation is unsupported with "coder.extrinsic", refer to this useful discussion thread:
Hope this helps!
  1 Kommentar
nadav
nadav am 5 Jan. 2025
thank you for your help.
when i try to use the coder.ceval, the ouput of the c file is a struct that i dont know how to approach the field inside.
meaning out.overflow for example does not work with the dpigen?
i know the fields of the struct, but i can't access them after calling coder.ceval.
can you please help and tell me if you know how can i get the field in the struct?

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by