0

I want to use HDL coder to convert MATLAB xcorr function to VHDL language. My code is given in below, i think i made a mistake when I'm defining the input data types. What should be the input data type to define a vector to use this code? Or am I doing wrong something else? You can see the errors from the picture below.

`

function corr=my_corr(a,b)

corr=xcorr(a,b);

end

`

??? Type mismatch: complex embedded.fi {ufix19_En9} ~= complex embedded.fi {ufix30_En14}.

Error in ==> xcorr Line: 495 Column: 9 Code generation failed: View Error Report

error report

1 Answers1

0

It seems something related to your input data types, try to convert your inputs to the same fixed point type before calling the function, use the form function.

PedroRodriguez
  • 368
  • 2
  • 9