Home / Learn Verilog / Interrupt Controller

Interrupt Controller

Mask, pend and prioritise.

Quick summaryMask, pend and prioritise.

How to think about this

IRQsourcespending regmask ANDpriorityIRQ to CPU
IRQ

What it is

Pending flags latch events; a mask enables them; a priority encoder picks the source.

Why it matters

CPU event handling.

Mechanically speaking

pending & mask -> highest set bit.

Shows up in

  • Everyday RTL design
  • FPGA and ASIC projects
  • Testbenches and debugging

Try it

4-source controllerVerilog: edit and run

Masked source 2 does not raise irq.

Check yourself

1. Mask bit 0 means...