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_ALU.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
 
6
ENTITY TB_ALU IS
7
END TB_ALU;
8
 
9
ARCHITECTURE behavior OF TB_ALU IS
10
 
11
    COMPONENT Alu
12
    PORT(
13
         A : IN  std_logic_vector(7 downto 0);
14
         B : IN  std_logic_vector(7 downto 0);
15
         op : IN  std_logic;
16
         S : OUT  std_logic_vector(7 downto 0)
17
        );
18
    END COMPONENT;
19
 
20
 
21
   --Inputs
22
   signal A : std_logic_vector(7 downto 0) := (others => '0');
23
   signal B : std_logic_vector(7 downto 0) := (others => '0');
24
   signal op : std_logic := '0';
25
 
26
        --Outputs
27
   signal S : std_logic_vector(7 downto 0);
28
 
29
BEGIN
30
 
31
   uut: Alu PORT MAP (
32
          A => A,
33
          B => B,
34
          op => op,
35
          S => S
36
        );
37
        A <= X"05" after 10 ns , X"0F" after 30 ns;
38
        B <= X"0A" after 10 ns , X"08" after 30 ns;
39
        op <= '1' after 20 ns , '0' after 40 ns;
40
 
41
END;

powered by: WebSVN 2.1.0

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