No Description
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_Ecran.vhd 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. ----------------------------------------------------------------------------------
  2. -- Company:
  3. -- Engineer:
  4. --
  5. -- Create Date: 28.06.2021 11:25:08
  6. -- Design Name:
  7. -- Module Name: Test_Ecran - Behavioral
  8. -- Project Name:
  9. -- Target Devices:
  10. -- Tool Versions:
  11. -- Description:
  12. --
  13. -- Dependencies:
  14. --
  15. -- Revision:
  16. -- Revision 0.01 - File Created
  17. -- Additional Comments:
  18. --
  19. ----------------------------------------------------------------------------------
  20. library IEEE;
  21. use IEEE.STD_LOGIC_1164.ALL;
  22. -- Uncomment the following library declaration if using
  23. -- arithmetic functions with Signed or Unsigned values
  24. --use IEEE.NUMERIC_STD.ALL;
  25. -- Uncomment the following library declaration if instantiating
  26. -- any Xilinx leaf cells in this code.
  27. --library UNISIM;
  28. --use UNISIM.VComponents.all;
  29. entity Test_Ecran is
  30. -- Port ( );
  31. end Test_Ecran;
  32. architecture Behavioral of Test_Ecran is
  33. component Ecran is
  34. Generic ( HEIGHT : Natural;
  35. WIDTH : Natural
  36. );
  37. Port ( CLK : in STD_LOGIC;
  38. RST : in STD_LOGIC;
  39. Data_Av : in STD_LOGIC;
  40. Data_IN : in STD_LOGIC_VECTOR (0 to 6);
  41. X : in Natural;
  42. Y : in Natural;
  43. OUT_ON : out STD_LOGIC);
  44. end component;
  45. signal my_CLK : STD_LOGIC := '0';
  46. signal my_RST : STD_LOGIC := '1';
  47. signal my_Data_Av : STD_LOGIC := '0';
  48. signal my_Data_IN : STD_LOGIC_VECTOR (6 downto 0) := (others => '0');
  49. signal my_X : Natural := 0;
  50. signal my_Y : Natural := 0;
  51. signal my_OUT_ON : STD_LOGIC := '0';
  52. constant CLK_period : time := 10 ns;
  53. begin
  54. instance : Ecran
  55. generic map( HEIGHT => 50,
  56. WIDTH => 68
  57. )
  58. port map( CLK => my_CLK,
  59. RST => my_RST,
  60. Data_Av => my_Data_Av,
  61. Data_IN => my_Data_IN,
  62. X => my_X,
  63. Y => my_Y,
  64. OUT_ON => my_OUT_ON);
  65. CLK_process : process
  66. begin
  67. my_CLK <= '0';
  68. wait for CLK_period/2;
  69. my_CLK <= '1';
  70. wait for CLK_period/2;
  71. end process;
  72. process
  73. begin
  74. my_Data_Av <= '1' after 0 ns;
  75. my_Data_IN <= "0000001" after 0 ns, "0000010" after 40 ns, "0000011" after 80 ns, "0000100" after 120 ns, "0001101" after 140 ns, "0000101" after 150 ns, "0000000" after 170 ns, "0000001" after 180 ns, "0000010" after 220 ns;
  76. wait;
  77. end process;
  78. end Behavioral;