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_SystemKeyboardScreen.vhd 3.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. ----------------------------------------------------------------------------------
  2. -- Company:
  3. -- Engineer:
  4. --
  5. -- Create Date: 07.07.2021 18:57:39
  6. -- Design Name:
  7. -- Module Name: Test_SystemKeyboardScreen - 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_SystemKeyboardScreen is
  30. -- Port ( );
  31. end Test_SystemKeyboardScreen;
  32. architecture Behavioral of Test_SystemKeyboardScreen is
  33. component SystemKeyboardScreen
  34. Port ( CLK : in STD_LOGIC;
  35. PS2Clk : in STD_LOGIC;
  36. PS2Data : in STD_LOGIC;
  37. vgaRed : out STD_LOGIC_VECTOR (3 downto 0);
  38. vgaGreen : out STD_LOGIC_VECTOR (3 downto 0);
  39. vgaBlue : out STD_LOGIC_VECTOR (3 downto 0);
  40. Hsync : out STD_LOGIC;
  41. Vsync : out STD_LOGIC);
  42. end component;
  43. signal CLK : STD_LOGIC := '0';
  44. signal PS2Clk : STD_LOGIC := '0';
  45. signal PS2Data : STD_LOGIC := '0';
  46. signal vgaRed : STD_LOGIC_VECTOR (3 downto 0) := (others => '0');
  47. signal vgaGreen : STD_LOGIC_VECTOR (3 downto 0) := (others => '0');
  48. signal vgaBlue : STD_LOGIC_VECTOR (3 downto 0) := (others => '0');
  49. signal Hsync : STD_LOGIC := '0';
  50. signal Vsync : STD_LOGIC := '0';
  51. signal CLK_period : Time := 10 ns;
  52. begin
  53. instance : SystemKeyboardScreen
  54. port map ( CLK => CLK,
  55. PS2Clk => PS2Clk,
  56. PS2Data => PS2Data,
  57. vgaRed => vgaRed,
  58. vgaGreen => vgaGreen,
  59. vgaBlue => vgaBlue,
  60. Hsync => Hsync,
  61. Vsync => Vsync);
  62. CLK_process : process
  63. begin
  64. CLK <= '0';
  65. wait for CLK_period/2;
  66. CLK <= '1';
  67. wait for CLK_period/2;
  68. end process;
  69. process
  70. begin
  71. PS2Clk <= '1' after 1020 ns, '0' after 1070 ns, '1' after 1120 ns, '0' after 1170 ns, '1' after 1220 ns, '0' after 1270 ns, '1' after 1320 ns, '0' after 1370 ns, '1' after 1420 ns, '0' after 1470 ns, '1' after 1520 ns, '0' after 1570 ns, '1' after 1620 ns, '0' after 1670 ns, '1' after 1720 ns, '0' after 1770 ns, '1' after 1820 ns, '0' after 1870 ns, '1' after 1920 ns, '0' after 1970 ns, '1' after 2020 ns, '0' after 2070 ns;
  72. PS2Data <= '0' after 1020 ns, '1' after 1120 ns, '0' after 1220 ns, '1' after 1320 ns, '0' after 1420 ns, '1' after 1520 ns, '0' after 1620 ns, '0' after 1720 ns, '0' after 1820 ns, '0' after 1920 ns, '1' after 2020 ns, '0' after 2120 ns;
  73. wait;
  74. end process;
  75. end Behavioral;