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 numbers" which is, as far as I know, not synthesizable. thankx1 Reply
- Altera_Forum
Honored Contributor
reals 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:
or something like that and you can create all sorts of functions that will be fully synthesisable.type complex_fixed_t is record rl : sfixed(7 downto -7); imag : sfixed(7 downto -7); end record complex_fixed_t;