Well in case you decide to venture out of your comfort zone a bit, I've written the SOPC system and C code for you and attached it. The top level file is "simple_sopc.v" and it's port declaration looks like this:
module simple_sopc (
// 1) global signals:
clk,
reset_n,
// the_result_pio
in_port_to_the_result_pio
)
;
clk is a 50mhz clock input.
reset_n is an active low asynchronous reset,
"in_port_to_the_result_pio" is a 32-bit input to a PIO where you would connect your result.
The only thing you have left to do is add this to your system and figure out how to connect to the processor using the "nios2-terminal.exe" application. You don't even have to open the NIOS2 IDE and look at the C-code as I've precompiled the processors memory file.
I'm thinking SignalTap will be your easiest solution.
Jake