Thank you all, I added some sort of while(1) to my code - I wrote scheduler that registered my function, and every tick run it and some other routines ...
I think that an Idle state is necessary to the NIOS, after all, if my code is event driven, so most of the time (80%) the cpu should do NOTHING !!!!!!
power consumption is an issue in embedded real time systems, and so is cpu temp, especially if one uses two cpu's or more .
donq - if you are correct, so alt_main must disable all interrupts, just like any other real time operation system (I know i'm working OSless ...)
how can I contact Altera to ask about cpu behavior after main has ended ?