I observed a small problem while initializing the data memory of SHARC 21369 with floating point values. I have a set of floating point coefficients to be initialized in the data memory. The code looks like this.
.var coeff = 0.693142768;
f0 = 0.693142768;
dm(_coeff) = f0;
After loading the code into the dsp and observing the memory locations showed that coeff had a value 0.69314271 and _coeff had the value 0.69314277 (Screenshot attached). The value of _coeff seems to be more correctly rounded. coeff and _coeff differed by 2 bits. I have observed similar results with some other values too.
My question is: Is it possible to make some settings in the Visual DSP IDE so that initializing a variable in data memory while it is declared happens to the correctly rounded value?
Thanks in advance