Knowledge Base Article
Uninitialized .bss Variables in Simulation
Description
If your program reads the value of an uninitialized .bss variable
during HDL simulation, and the BSP (system library) is compiled
with the ModelSim only, no hardware support property
enabled in Nios II IDE, a warning appears about unfiltered data
being 'x'. This warning appears because when this property
is enabled, the code that clears the .bss memory region
is omitted to speed up HDL simulation so this memory region is uninitialized.
The .bss region contains global and static local variables
that are not initialized by the application so they default to a value
of zero. When the Nios II processor reads uninitialized variables,
it displays a warning and converts any of the bits of the uninitialized
data to zero which correctly mimics the effect of the missing .bss clearing
code. The Hardware Abstraction Layer (HAL) code that executes before
and after main() might use .bss variables,
so these warnings might appear even if your application does not
use the .bss section.