Try the following code and see if it works for you.
library IEEE;
Use IEEE.Std_logic_1164.all;
Use IEEE.Std_logic_unsigned.all;
Use IEEE.Numeric_Std.all;
Use IEEE.Std_logic_arith.all;
Entity final_game_01 Is
Port(
enable : In std_logic;
clk : In std_logic;
-- score0, score1 : out std_logic_vector (6 downto 0);
LED : Out std_logic_vector (8 downto 0)
);
End Entity;
Architecture RTL Of final_game_01 Is
Signal Count_M9 : std_logic_vector(3 downto 0);
Signal Count_M13: std_logic_vector(3 downto 0);
Begin
-- Mod-9 Counter
Process (clk, enable)
Begin
If(enable = '0') then
Count_M9 <= "0000";
Elsif (enable = '1') then
If (clk = '1' and clk'event) then
If (Count_M9 = "1001") then
Count_M9 <= "0000";
Else
Count_M9 <= Count_M9 + '1';
End If;
End If;
End If;
End Process;
-- Mod-13 Counter
Process (clk, enable)
Begin
If(enable = '0') then
Count_M13 <= "0000";
Elsif (enable = '1') then
If (clk = '1' and clk'event) then
If (Count_M13 = "1101") then
Count_M13 <= "0000";
Else
Count_M13 <= Count_M13 + '1';
End If;
End If;
End If;
End Process;
-- Compare counters and drive LEDs
Process (Count_M9, Count_M13)
Begin
If (Count_M9 = "0000" and Count_M13 = "0000") then
LED <= "000000001";
ElsIf (Count_M9 = "0001" and Count_M13 = "0001") then
LED <= "000000010";
ElsIf (Count_M9 = "0010" and Count_M13 = "0010") then
LED <= "000000100";
ElsIf (Count_M9 = "0011" and Count_M13 = "0011") then
LED <= "000001000";
ElsIf (Count_M9 = "0100" and Count_M13 = "0100") then
LED <= "000010000";
ElsIf (Count_M9 = "0101" and Count_M13 = "0101") then
LED <= "000100000";
ElsIf (Count_M9 = "0110" and Count_M13 = "0110") then
LED <= "001000000";
ElsIf (Count_M9 = "0111" and Count_M13 = "0111") then
LED <= "010000000";
ElsIf (Count_M9 = "1000" and Count_M13 = "1000") then
LED <= "100000000";
Else
LED <= "000000000";
End If;
End Process;
End RTL;
It's just two counters (Mod 9 and Mod13) running in parallel and the outputs of the counters drive the LEDs as you've mentioned.