package MY_PACKAGE is type state is (s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12); type state1 is (s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12,s13,s14); end MY_PACKAGE; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use work.my_package.all; entity counter1_15 is port( clock: in std_logic; hit_15: out std_logic ); end counter1_15; architecture behavioral of counter1_15 is signal st:state1; begin count_to_15:process begin wait until clock'event and clock = '1'; case st is when s0 => st <= s1; hit_15 <= '0'; when s1 => st <= s2; hit_15 <= '0'; when s2 => st <= s3; hit_15 <= '0'; when s3 => st <= s4; hit_15 <= '0'; when s4 => st <= s5; hit_15 <= '0'; when s5 => st <= s6; hit_15 <= '0'; when s6 => st <= s7; hit_15 <= '0'; when s7 => st <= s8; hit_15 <= '0'; when s8 => st <= s9; hit_15 <= '0'; when s9 => st <= s10; hit_15 <= '0'; when s10 => st <= s11; hit_15 <= '0'; when s11 => st <= s12; hit_15 <= '0'; when s12 => st <= s13; hit_15 <= '0'; when s13 => st <= s14; hit_15 <= '0'; when s14 => st <= s0; hit_15 <= '1'; end case; end process; end behavioral; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use work.my_package.all; entity hello is port( -- clock : in std_logic; display : out std_logic_vector(6 downto 0) ); end hello; architecture behavioral of hello is signal clock: std_logic; signal slow_clock: std_logic; signal st: state; component OSC4 port( F15:out std_logic ); end component; component counter1_15 port( clock:in std_logic; hit_15:out std_logic ); end component; begin U1:OSC4 port map (clock); U2:counter1_15 port map(clock, slow_clock); hello_world:process begin wait until slow_clock'event and slow_clock = '1'; case st is when s0 => display <= "1000001"; --H st <= s1; when s1 => display <= "0100100"; --E st <= s2; when s2 => display <= "0101101"; --L st <= s3; when s3 => display <= "0101101"; --L st <= s4; when s4 => display <= "0001000"; --O st <= s5; when s5 => display <= "1111111"; -- st <= s6; when s6 => display <= "0100100"; --E st <= s7; when s7 => display <= "0100100"; --E st <= s8; when s8 => display <= "0101100"; --C st <= s9; when s9 => display <= "0100010"; --S st <= s10; when s10 => display <= "1111111"; -- st <= s11; when s11 => display <= "1110111"; --- st <= s12; when s12 => display <= "1111111"; -- st <= s0; end case; end process; end behavioral;