Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21328 Discussions

Complex numbers -VHDL

Altera_Forum
Honored Contributor II
2,619 Views

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
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
1,581 Views

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

0 Kudos
Altera_Forum
Honored Contributor II
1,581 Views

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
0 Kudos
Altera_Forum
Honored Contributor II
1,581 Views

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

0 Kudos
Altera_Forum
Honored Contributor II
1,581 Views

wow complex number are great!

0 Kudos
Reply