-
Notifications
You must be signed in to change notification settings - Fork 0
/
kbd_video_pipeline_test.vhd
65 lines (55 loc) · 1.4 KB
/
kbd_video_pipeline_test.vhd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use work.vga_util.all;
use work.ps2_util.all;
entity kbd_video_pipeline_test is
port (
clk: in std_logic;
ps2_clk, ps2_data: in std_logic;
vga_hs: out std_logic;
vga_vs: out std_logic;
vga_r: out std_logic_vector(3 downto 0);
vga_g: out std_logic_vector(3 downto 0);
vga_b: out std_logic_vector(3 downto 0)
);
end entity;
architecture rtl of kbd_video_pipeline_test is
constant HEIGHT: natural := 60;
constant WIDTH: natural := 80;
-- PS2 controller signals
signal keycode: ps2_keycode_T;
signal kc_strobe, make, err: std_logic := '0';
signal addr: std_logic_vector(15 downto 0) := X"0000";
signal di, do: std_logic_vector(7 downto 0) := X"00";
signal en, regce, we: std_logic := '0';
begin
kbd_intf: process
begin
if rising_edge(clk) then
case
video_pipeline_inst: entity work.video_pipeline(rtl)
generic map (
videomode => (640, 480, 60)
) port map (
clk => clk, en => '1', reset => '0',
hsync => vga_hs, vsync => vga_vs,
red => vga_r, green => vga_g, blue => vga_b,
addrb => addr,
dib => di
dob => do,
enb => en,
regceb => regce,
web => we
);
ps2_kbd_intf_inst: entity work.ps2_interface(rtl)
port map (
clk => clk, en => '1', reset => '0',
ps2_clk => ps2_clk,
ps2_data => ps2_data,
keycode => keycode,
kc_strobe => kc_strobe,
make => make,
err => err
);
end architecture;