Forum Discussion

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

printing floating point

Hi, is there any ways to print float number in Nios II? Example:

a = 100, b = 195

c = (b-a)/100, so c = 0.95

so, how to print c = 0.95? because when i print, the answer is 0.

11 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Use a bigger memory.... The stack and heap assuming you assigned all the linker sections to the on-chip memory will be located at the end of the memory. If you don't have enough room to double the memory you could try using separate smaller memories and assigning the linker sections manually using the BSP Editor.