Forum Discussion
Altera_Forum
Honored Contributor
13 years agoDo you mean that the value is being written as an integer?
That will mean that somewhere in the C you are casting (maybe implicitly) the 'float' to an 'int' and the relevant conversion function is being called. You need to use define your IO location as 'float *'. It might be good enough to define a union of float and int and copy the data value through it (you do need to have a variable of the union type, just using casts - *(int *)&float_variable - isn't required to force the compiler to do the reads and writes in the correct order).