-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocessor_tb.vhdl
More file actions
58 lines (48 loc) · 1.25 KB
/
Copy pathprocessor_tb.vhdl
File metadata and controls
58 lines (48 loc) · 1.25 KB
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
library ieee;
use ieee.std_logic_1164.all;
entity processor_tb is
end entity processor_tb;
architecture tb_arch of processor_tb is
signal Clk: std_logic := '0';
signal Reset: std_logic := '0';
signal Program_counter: std_logic_vector(5 downto 0):=(others => '0');
signal destnation_register: std_logic_vector( 7 downto 0) := (others => '0');
component processor
port (
Clk: in std_logic;
Reset: in std_logic;
Program_counter : out std_logic_vector(5 downto 0):=(others => '0');
destnation_register : out std_logic_vector( 7 downto 0)
);
end component;
begin
DUT: processor port map (
Clk => Clk,
Reset => Reset,
Program_counter => Program_counter,
destnation_register=>destnation_register
);
-- Clock process
Clk_Process: process
begin
while now < 800 ns loop
clk <= '0';
wait for 5 ns;
clk <= '1';
wait for 5 ns;
end loop;
wait;
end process;
-- Reset process
process
begin
reset <= '1';
wait for 10 ns;
reset <= '0';
wait;
end process;
Stimulus: process
begin
wait;
end process;
end architecture tb_arch;