Hi,
You'll want to use the "alt_ic_isr_register" function from sys/alt_irq.h, with which you can register your own function from your code as a user-defined interrupt routine. Have a look at the documentation for specification and usage: https://www.intel.com/content/dam/altera-www/global/ja_JP/pdfs/literature/hb/nios2/n2sw_nii52006.pdf
Cheers,
The TAs team