EmbDev.net

Forum: FPGA, VHDL & Verilog similar simon game


von Lucas (Guest)


Rate this post
useful
not useful
Dear Experts

my name is luke i need help to make project similar simon game my game 
is 20 levels and eight LEDs which demonstrate for each sequencein vhdl 
but but I'm not getting evolve follows the code I start to evaluate do 
there is an easier way? you guys have any similar project ready

thank you

Lucas




entity Game_sequencia is

   Port ( Botoes_IB : in  STD_LOGIC_VECTOR (0 downto 7);
           Botoes_IB1 : in  STD_LOGIC_VECTOR (0 downto 3);
           Saidas_QB : out  STD_LOGIC_VECTOR (0 downto 7)
        Nivel: out integer  (1 to 20)
        );



end Game_sequencia;


architecture Behavioral of Game_sequencia is

begin

    if (Botoes_IB1 = "1000") then
       Saidas_QB <= "00010000"
       Nivel <= 1
     end if;

    case Nivel
      when = 1
      if IB = ("00010000")
      Nivel <= 2
        elsif
          Nivel<=0
      end if;

      when = 2
      Saidas_QB <= "00010000"
      Saidas_QB <= "01000000"
      if IB = ("01010000") then
      Nivel <= 3
      elsif
          Nivel<=0
      end if;

      when = 3
      Saidas_QB <= "00010000"
      Saidas_QB <= "01000000"
      Saidas_QB <= "00000100"
      if IB = ("01010100") then
      Nivel <= 4
      elsif
          Nivel<=0
      end if;

    when = 4
      Saidas_QB <= "00010000"
      Saidas_QB <= "01000000"
      Saidas_QB <= "00000100"
      Saidas_QB <= "00000001"
      if IB = ("01010101") then
      Nivel <= 5
      elsif
          Nivel<=0
      end if;

von Edi M (Guest)


Rate this post
useful
not useful
Simon game?

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.