-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreg_test.vhd
39 lines (37 loc) · 1.16 KB
/
reg_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
library ieee;
use ieee.std_logic_1164.all;
entity reg_test is
port(clk,reset : in std_logic;
input_0 : in std_logic;
input_1 : in std_logic;
input_2 : in std_logic;
input_3 : in std_logic;
input_4 : in std_logic;
input_5 : in std_logic;
input_6 : in std_logic;
input_7 : in std_logic;
input_8 : in std_logic;
input_9 : in std_logic;
input_a : in std_logic;
input_b : in std_logic;
input_c : in std_logic;
input_d : in std_logic;
input_e : in std_logic;
input_f : in std_logic;
q : out std_logic_vector(15 downto 0));
end reg_test;
architecture behave of reg_test is
begin
process(clk,reset)
variable temp: std_logic_vector(15 downto 0);
begin
temp := input_f & input_e & input_d & input_c & input_b & input_a & input_9
& input_8 & input_7 & input_6 & input_5 & input_4 & input_3 & input_2
& input_1 & input_0;
if reset = '1' then
q <= "0000000000000000";
elsif clk'event and clk = '1' then
q <= temp;
end if;
end process;
end behave;