process ( clock , reset ) is
begin
if reset = '1' then
registered_x <= ( others => '0' ) ;
registered_y <= ( others => '0' ) ;
elsif rising_edge ( clock ) then
registered_x <= x ;
registered_y <= x ;
end if ;
end process ;
change_xy <= '1' when ( x /= registered_x or y /= registered_y ) else '0' ;
process ( clock , reset ) is
begin
if reset = '1' then
result <= ( others => '0' ) ;
delay <= ( others => '0' ) ;
ready <= '0' ;
elsif rising_edge ( clock ) then
if change_xy = '1' then
ready <= '0' ;
delay <= ( others => '0' ) ;
elsif delay < enough_cycles then
result <= do_something ( x , y ) ;
delay <= delay + 1 ;
else
ready <= '1' ;
end if ;
end if ;
end process ;