Handling interrupts in NOEL

I can’t figure how exactly does NOEL handle interrupts.

According to The RISC-V Instruction Set Manual, all I need to do to enable interrupts is to set mstatus.MIE bit, enable them in mie csr register and write trap handler’s laber address into mtvec.

From here, all that’s left from user is to enable interrupts in, let’s say, timer, and whenever it would underflow, machine would jump to the mtvec address. Doing all that, but there’s no jumping, and no interrupts pending in mip register.

Is there any error in my chain of thought? Have I made an error? Does NOEL’s PLIC and ACLINT handle interrupts differently, or there’s some settings in VHDL project that I’ve missed?

Hi!

What you are describing should work. However, do note that depending on if the SMRNMI extension is implemented or not all interrupts are masked until mnstatus.nmie is set to 1. Could you try setting mnstatus and see if that helps?

Hey, thanks for responding!

Turns out all I needed to do is to set up PLIC and it worked just fine. Set up with MIE still required on core’s side.