-
Notifications
You must be signed in to change notification settings - Fork 1
/
sincronismo_vga_tb.vhd
61 lines (50 loc) · 1.27 KB
/
sincronismo_vga_tb.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
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
use std.env.finish;
entity sincronismo_vga_tb is
end sincronismo_vga_tb;
architecture tb of sincronismo_vga_tb is
component sincronismo_vga is
port (
hsync : out std_logic;
vsync : out std_logic;
p_clk : in std_logic;
visible : out std_logic;
linea : out std_logic_vector (9 downto 0);
columna : out std_logic_vector (9 downto 0);
rst : in std_logic;
hab : in std_logic
);
end component ;
constant pixel_clk : time := 39.722 ns;
signal p_clk_in, hsync_out, vsync_out, visible_out : std_logic;
signal linea_out, columna_out : std_logic_vector ( 9 downto 0);
signal hab,rst : std_logic;
begin
hab <= '1';
DUT : sincronismo_vga port map(
p_clk => p_clk_in,
hsync => hsync_out,
vsync => vsync_out,
visible => visible_out,
linea => linea_out,
columna => columna_out,
rst => rst,
hab => hab);
sim: process
begin
rst <= '1';
wait for 1 ns;
rst <= '0';
wait for 17 ms;
finish;
end process;
pixel_signal: process
begin
p_clk_in <= '0' ;
wait for pixel_clk / 2;
p_clk_in <= '1';
wait for pixel_clk / 2;
end process;
end tb;