Forum Discussion
ETang2
Occasional Contributor
4 months agoNiosV and juart-terminal
I had a project which works fine under niosII. I upgrade all the project with niosv and all seems fine except printing values in juart-terminal. Here is the main code : #include <stdio.h> #inclu...
- 4 months ago
Summary:
- printf(%f) always prints 0, even if the variable contains valid floating-point number.
Change the On-Chip Ram size from decimal (such as 167.5KB / 167500 bytes) to binary (such as 167KiB / 171008 bytes). - Character é is printed wrongly.
Change the active code page of Windows's command prompt from 437 to 65001 (UTF-8)
- printf(%f) always prints 0, even if the variable contains valid floating-point number.
LiangYuG_Altera
Contributor
4 months agoHi ETang2
Please find enclosed the tcl export and a screenshot.
Thanks for the BSP Tcl and photo. I am able to replicate the issue in my design.
It is related to the OCRAM size assignment.
Specifically, the idea of 4KiB is 4,096 bytes.
The issue is replicated when the OCRAM is not "power-of-2-aligned", such as 167500 bytes.
Once OCRAM is "power-of-2-aligned" with 171008 bytes, the issue is resolved.
Please try a "power-of-2-aligned" OCRAM size in your design.
(Tips: You can input 167k in the OCRAM input parameter, and Quartus will automatically populated as 171008)
Regards,
Liang Yu