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

Subversion Repositories generic_booth_multipler

[/] [generic_booth_multipler/] [trunk/] [rtl/] [benches/] [TB_Adder.vhd] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 alimpk
 
2
LIBRARY ieee;
3
USE ieee.std_logic_1164.ALL;
4
 
5
ENTITY TB_Adder IS
6
END TB_Adder;
7
 
8
ARCHITECTURE behavior OF TB_Adder IS
9
 
10
    -- Component Declaration for the Unit Under Test (UUT)
11
 
12
    COMPONENT Adder
13
    PORT(
14
         A : IN  std_logic_vector(7 downto 0);
15
         B : IN  std_logic_vector(7 downto 0);
16
         Cin : IN  std_logic;
17
         S : OUT  std_logic_vector(7 downto 0);
18
         Cout : OUT  std_logic
19
        );
20
    END COMPONENT;
21
 
22
 
23
   --Inputs
24
   signal A : std_logic_vector(7 downto 0) := (others =>'0');
25
   signal B : std_logic_vector(7 downto 0) := (others =>'0');
26
   signal Cin : std_logic := '0';
27
 
28
        --Outputs
29
   signal S : std_logic_vector(7 downto 0);
30
   signal Cout : std_logic;
31
   -- No clocks detected in port list. Replace <clock> below with 
32
   -- appropriate port name 
33
 
34
BEGIN
35
 
36
        -- Instantiate the Unit Under Test (UUT)
37
   uut: Adder PORT MAP (
38
          A => A,
39
          B => B,
40
          Cin => Cin,
41
          S => S,
42
          Cout => Cout
43
        );
44
        cin <= '1' after 20 ns , '0' after 40 ns;
45
        A <= X"05" after 10 ns , X"06" after 20 ns , X"F8" after 30 ns ;
46
        B <= X"0F" after 10 ns , X"0A" after 20 ns , X"F3" after 30 ns ;
47
END;

powered by: WebSVN 2.1.0

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