Forum Discussion
Altera_Forum
Honored Contributor
14 years agoComplex 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 You4 Replies
- Altera_Forum
Honored Contributor
Complex number is still a number, so separate real and imaginary parts and use them as simple numbers.
- Altera_Forum
Honored 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
Honored Contributor
Just do the same thing as in C. Have one signal for the real part and another one for the imaginary part.
- Altera_Forum
Honored Contributor
wow complex number are great!