Forum Discussion
Altera_Forum
Honored Contributor
15 years agoFloat 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.vh...
Altera_Forum
Honored Contributor
15 years agoyou need to scale according to your target range. If a signal is swinging say +/-1 then to scale it for 10 bit signed you need the max value of 1 = 511 and so on:
value = round(511*signal/max(abs(signal))); You may go lower for any other reason.