Altera_Forum
Honored Contributor
9 years agoInterrupt detection
Is it right to do so?
if (rising_edge(CLK)) then
busy1 <= BUSY;
busy2 <= busy1;
if (busy1 = '1' and busy2 = '0') then
int <= '1';
else
int <= '0';
end if;
end if;
I thought to do (busy1 xor busy2) but this way I don't know on what edge was the interrupt - falling or rising.