----------------------------

-- Player button

-- Travis Robinson

-- Marc Dowdell

----------------------------

-- players button for reflex game

library ieee;

use ieee.std_logic_1164.all;

use ieee.std_logic_unsigned.all;

entity player_button is

port(reset, button, start: in std_logic;

pressed: out std_logic;

done: buffer std_logic

);

end entity;

architecture p_b of player_button is

begin

process(reset, button)

variable but_pres,finished: std_logic;

begin

if reset = '0' then

but_pres:='1';

finished:='1';

end if;

if reset = '1' then

if start = '0' and done = '1' then

if button='0' then

but_pres:= '0';

finished:= '0';

end if;

end if;

end if;

pressed<= but_pres;

done<=finished;

end process;

end architecture;

Top of Page | Main | Reflex_game.vhd