You can do a simple edge-detection in a clocked process
, and then just react to rising edges. For instance:
signal lastButtonState : std_logic := '0';
process(clk)
begin
if(rising_edge(clk)) then
if(buttonState = '1' and lastButtonState = '0') then --assuming active-high
--Rising edge - do some work...
end if;
lastButtonState <= buttonState;
end if;
end process;
To get everything working correctly, you'll need to make sure that your pushbuttons are debounced in some way though. Many development boards have a hardware RC circuit for this, but otherwise you'll need to do it in your code (which isn't that hard though - there should be plenty examples of this around on the net).