Übungen der VHDL-Einführung
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_top_entity.vhd 918B

2 months ago
123456789101112131415161718192021222324252627282930313233343536373839404142
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. library std;
  4. use std.env.all;
  5. entity test_top_entity is
  6. generic( CHECK_RESULTS : boolean );
  7. end entity test_top_entity;
  8. architecture test of test_top_entity is
  9. signal CLK : std_logic := '0';
  10. signal RESET : std_logic := '1';
  11. signal CNT : std_logic_vector(6 downto 0);
  12. begin
  13. u_top_entity : entity work.top_entity
  14. port map (
  15. CLK => CLK,
  16. RESET => RESET,
  17. CNT => CNT
  18. );
  19. CLK <= not CLK after 10 ns;
  20. p_reset : process( CLK )
  21. begin
  22. if falling_edge( CLK ) then
  23. RESET <= '0';
  24. end if;
  25. end process p_reset;
  26. p_run : process
  27. begin
  28. wait until falling_edge( RESET );
  29. for i in 0 to 128 loop
  30. wait until rising_edge( CLK );
  31. end loop;
  32. wait until rising_edge( CLK );
  33. stop;
  34. end process p_run;
  35. end architecture test;