OpenCores
URL https://opencores.org/ocsvn/iqcorrection/iqcorrection/trunk

Subversion Repositories iqcorrection

[/] [iqcorrection/] [trunk/] [booth_multiplier_testbench.vhd] - Blame information for rev 35

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 35 Abraxas3d
entity booth_multiplier_testbench is
2
end entity;
3
 
4
 
5
architecture booth_multiplier_testbench_arch of booth_multiplier_testbench is
6
 
7
component booth_multiplier IS
8
    GENERIC(k : POSITIVE := 31); --input number word length less one 
9
    PORT(multiplicand, multiplier : IN BIT_VECTOR(k DOWNTO 0);
10
       clock : IN BIT; product : INOUT BIT_VECTOR((2*k + 1) DOWNTO 0));
11
END component;
12
 
13
 
14
--signals here
15
 
16
signal multiplicand_tb : bit_vector(31 downto 0);
17
signal multiplier_tb : bit_vector(31 downto 0);
18
signal product_tb : bit_vector((2*31+1) downto 0);
19
signal clk_tb : bit;
20
signal clk_tb_delayed : bit;
21
 
22
begin
23
 
24
 
25
 
26
DUT : booth_multiplier
27
generic map(k => 31)
28
port map(
29
multiplicand => multiplicand_tb,
30
multiplier => multiplier_tb,
31
product => product_tb,
32
clock => clk_tb_delayed
33
);
34
 
35
 
36
 
37
STIM : process is
38
 
39
begin
40
 
41
        multiplicand_tb <= x"10000000";
42
        multiplier_tb <= x"10000001";
43
 
44
 
45
--      multiplicand_tb <= x"00000001";
46
--      multiplier_tb <= x"00000001";
47
 
48
        --multiplicand_tb <= x"0000A50D";
49
--      multiplier_tb <= x"6197ead4";
50
wait;
51
end process;
52
 
53
 
54
 
55
 
56
 
57
 
58
 
59
 
60
 
61
 
62
DRIVE_CLOCK:process
63
begin
64
        wait for 50 ns;
65
        clk_tb <= not clk_tb;
66
        clk_tb_delayed <= not clk_tb_delayed after 1 ns;
67
end process;
68
 
69
 
70
 
71
 
72
 
73
 
74
end booth_multiplier_testbench_arch;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.