Persistent RAM variables in NIOS II
NIOS uses a GCC variant, so you can use the GCC style attributes to place a variable in the .noinit section which basically forgoes any initialisation of the variable. e.g.

char someVar __attribute__ ((section (".noinit")));


The RAM is not cleared during a NIOS processor reset, and GCC wont initialise the value of it, so the variable should survive.

It wouldn't however survive a full FPGA reset/reconfigure as that would reinitialise the RAM entirely. To cope with that you would need external SRAM.