Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
13 years ago

Complex numbers -VHDL

HI all

I have a matlab code which am to convert to vhdl.

1. How to deal with complex numbers in vhdl. I have heard that math_complex package cannot be synthesized. I have a input excel file which has complex numbers. how am i supposed to retrieve it into real and imaginary parts?

2. Can i convert complex data into a binary data? I want to give the input in binary so i can get rid of this problems

Please help

Thank You

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Complex number is still a number, so separate real and imaginary parts and use them as simple numbers.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    i was asking the same..how to seperate imaginary from real..In c we could have done that by saving the imaginary part when it encounters i(imaginary ) of a complex no. as such..how do we do that here?

    Please excuse me if am wrong
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Just do the same thing as in C. Have one signal for the real part and another one for the imaginary part.