Forum Discussion
Altera_Forum
Honored Contributor
15 years agocomplex math in VHDL
Hi, I wonder if there is any synthesizable VHDL code/Library to deal with math operations on complex numbers; especially transforming into/from polar. The library math_complex uses "real numb...
Altera_Forum
Honored Contributor
15 years agoreals are not synthesisable.
There are no other synthesisable libraries that deal with it - but there is nothing to stop you writing your own, especially if you use the new fixed point libraries. Just delcare a record type:
type complex_fixed_t is record
rl : sfixed(7 downto -7);
imag : sfixed(7 downto -7);
end record complex_fixed_t;
or something like that and you can create all sorts of functions that will be fully synthesisable.