-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmultiplier_tb.vhd
45 lines (33 loc) · 974 Bytes
/
multiplier_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
library IEEE;
use IEEE.Std_logic_1164.all;
use IEEE.Numeric_Std.all;
entity multiplier_tb is
end;
architecture bench of multiplier_tb is
constant X : integer := 16;
component multiplier
generic (X : integer := 16);
port (
signal A : in std_logic_vector(X-1 downto 0);
signal B : in std_logic_vector(X-1 downto 0);
signal P : out std_logic_vector(((2*X)-1) downto 0)
);
end component;
signal A: std_logic_vector(X-1 downto 0);
signal B: std_logic_vector(X-1 downto 0);
signal P: std_logic_vector(((2*X)-1) downto 0) ;
begin
-- Insert values for generic parameters !!
uut: multiplier generic map ( X => 16)
port map ( A => A,
B => B,
P => P );
stimulus: process
begin
-- Put initialisation code here
A <= X"0001";
B <= X"0002";
-- Put test bench stimulus code here
wait;
end process;
end;