top.vhd 877 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use ieee.numeric_std.all;
  4. entity top is
  5. --if you want to add further inputs/outputs, use the input/output
  6. -- names already defined in the pin planner
  7. port (
  8. clk : in std_logic;
  9. keys : in std_logic_vector(3 downto 0);
  10. ledg : out std_logic_vector(8 downto 0);
  11. ledr : out std_logic_vector(17 downto 0)
  12. );
  13. end entity;
  14. architecture arch of top is
  15. component gettoknow is
  16. port (
  17. clk_clk : in std_logic := '0'; -- clk
  18. reset_reset_n : in std_logic := '1' -- reset_n
  19. );
  20. end component gettoknow;
  21. signal reset_n : std_logic;
  22. begin
  23. u0 : component gettoknow
  24. port map (
  25. clk_clk => clk, -- clk.clk
  26. reset_reset_n => reset_n -- reset.reset_n
  27. );
  28. -- use key(0) as reset for the Platform Desginer system
  29. reset_n <= keys(0);
  30. ledg <= (others=>'0');
  31. ledr <= (others=>'0');
  32. end architecture;