Altera_Forum
Honored Contributor
7 years agoFixed Point and DSP Usage
Hi, everyone.
Referring to code below, I am trying to implement fixed point arithmetic to replace floating point arithmetic for my application. Surprisingly, the DSP usage increases tremendously(around 100%) from 30(floating point) to 64 (fixed point). However, all other resources: ram, logic and etc is reduced.
// Note variable A & B is 16 bit short, passed as argument from host
int sum;
short C;
for loop
sum += A + B;
end
C = 0xffff & (sum >> 8);
Regarding to the report, i have few doubts: - Does Fixed Point arithmetic helps to reduce the DSP usage?Because, as far as i know, dsp block only consumed by floating point operation(please correct me if i'm wrong)
- Am I doing the fixed point in a correct way ?
- And what approach I can take to further reduce the DSP usage?