Forum Discussion

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

Float to Fixed Point in FPGA

Hi there.

I have DSP code in C with floating point, now I try to convert to FPGA to use fixed point. Can you guys show me how to do it?

I did little research document from http://www.vhdl.org/fphdl/ with fixed_pkg_c.vhdl. But I don't know how to start.

example in C:

i_sample = 0.7071;

q_sample = 0.2487;

How do I take this floating point to convert to fixed point or hex value?

Thank you guys,

Sean

11 Replies