Forum Discussion
Altera_Forum
Honored Contributor
21 years agosmfelsher,
By defining the interrupt as level sensitive, you are stating that the following behavior is what you want: irq = |(irq_mask & pio_data) This means that if any of the bits in pio_data and the corresponding bit in irq_mask are high, the irq will be generated. If you're looking for something that detects events on each and every bit, I think you'd be happier with edge_capture. The edge_capture register will also hold event values until it is cleared (by writing to it). I hope this helps. Best Regards, slacker P.S.: You could use your IRQ_MASK settings to define different sorts of interrupt events. It all depends upon what sort of hardware you're trying to interface with... P.S.: Even if you're not an HDL expert, looking at what happens in the verilog or VHDL that's generated with any of the various PIOs is a useful exercise to understand what the hardware is doing.