Visible to Intel only — GUID: ekr1629599450744
Ixiasoft
2.3.5. Interrupt Controller
- Platform interrupts with 16 level-sensitive interrupt request (IRQ) inputs.
- Timer and Software interrupt - generated internally. You can access the timer interrupt register using the Timer and Software interrupt module interface by connecting to the data bus.
During an interrupt, the core writes the Program Counter of the attached instruction into the Machine Exception Program Counter (mepc) register. An interrupt is usually attached to the instruction in E-stage or in the preceding F or D pipeline stages. This is because the M-stage initiates the General Purpose Register. Thus, the core is not capable of retracting a memory instruction in M-stage. When an instruction in M-stage flags an exception while an interrupt is pending and ready to be serviced, the core will fetch and execute the exception instruction. If a memory or multicycle instruction is pending in M-stage, for example, the core is waiting for the response, the core does not flag an interrupt until the core receives a response for that instruction. Pending interrupts are flagged by their corresponding bits in Machine Interrupt-Pending (mip) register.
An interrupt is taken only when Machine Status Register (mstatus) bit 3 is asserted and bits corresponding to its pending interrupt in Machine Interrupt-pending (mip) register is asserted.
Register | Description |
---|---|
mstatus | mstatus[3] / Machine Interrupt-enable (MIE) field
|
mie |
mie[7] / Machine Timer Interrupt-enable (MTIE) field
mie[3] / Machine Software Interrupt-enable (MSIE) field
|
mip | mip[7] / Machine Timer Interrupt-pending (MTIP) field
mip[3] / Machine Software Interrupt-pending (MSIP) field
|