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
  • This question does not address non-extant VHDL code. Commented Mar 5, 2019 at 18:15

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.