Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
935 Views

Interrupt 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.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor I
21 Views

Looks fine to me. You're looking for a rising edge on BUSY... 

 

Cheers, 

Alex
Reply