-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestbench_top.vhd
68 lines (51 loc) · 1.38 KB
/
testbench_top.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
66
67
68
LIBRARY ieee;
USE ieee.std_logic_1164.all;
use IEEE.numeric_std.all;
entity testbench_top is
end testbench_top;
architecture behavoral of testbench_top is
component top_level is
generic(N: integer := 8; N2: integer:=256 ; N1: integer:=1);
port (
iCLK : in std_logic;
reset_in : in std_logic;
keypad_data : in std_logic_vector(4 downto 0);
address_o : out std_logic_vector(7 downto 0);
we, oe : out std_logic;
IO : inout std_logic_vector(15 downto 0);
data_out : out std_logic_vector(27 downto 0)
);
end component;
signal iCLK : std_logic :='0';
signal reset_in :std_logic :='0';
signal address_o :std_logic_vector(7 downto 0);
signal we, oe :std_logic;
signal IO :std_logic_vector(15 downto 0);
signal keypad_data : std_logic_vector(4 downto 0) := "00000";
signal data_out : std_logic_vector(27 downto 0);
begin
iCLK <= not iCLK after 10 ns;
DUT: Top_level
generic map(N => 8, N2=> 256, N1 =>1)
port map(
iCLK => iCLK,
reset_in => reset_in,
address_o => address_o,
we => we,
oe => oe,
IO => IO,
keypad_data => keypad_data,
data_out => data_out
);
process
begin
wait for 1000 us;
keypad_data <= "10000";
wait for 10 us;
keypad_data <= "00000";
--wait for 15 ns;
--keypad_data <= '0';
wait for 1000 us;
end process;
end behavoral;
--