MIPS assembly to determine whether hardware I/O interrupt has occurred? -
in mips32 exception handler, want determine whether exception caused i/o interrupt. cause register bits 2-6 inclusive has checked. what's mips assembly code determine this?
you have mask out each bit check interrupt came from. exception handler procedure shown here: exchandler http://i47.tinypic.com/5yt47c.png can see manual hardware says interrupt came , theres error codes u can load register , compare epie register see if exception trap or interrupt, remember reset epie (error status register) before return error , enable interrupt bits in processors control register allow hardware make interrupts.
this scheme used when coding exception handler nios ii, procedure should similar mips32.
mips assembly language, mips: interrupts , exceptions page 22
Comments
Post a Comment