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_RightShiftReg.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_RightShiftReg IS
7
END TB_RightShiftReg;
8
 
9
ARCHITECTURE behavior OF TB_RightShiftReg IS
10
 
11
 
12
 
13
    COMPONENT RightShiftReg
14
    PORT(
15
         clock : IN  std_logic;
16
         enable : IN  std_logic;
17
         shift : IN  std_logic;
18
         din : IN  std_logic_vector(8 downto 0);
19
         dout : OUT  std_logic_vector(1 downto 0)
20
        );
21
    END COMPONENT;
22
 
23
 
24
   --Inputs
25
   signal clock : std_logic := '0';
26
   signal enable : std_logic := '0';
27
   signal shift : std_logic := '0';
28
   signal din : std_logic_vector(8 downto 0) := (others => '0');
29
 
30
        --Outputs
31
   signal dout : std_logic_vector(1 downto 0);
32
 
33
   -- Clock period definitions
34
   constant clock_period : time := 10 ns;
35
 
36
BEGIN
37
 
38
        -- Instantiate the Unit Under Test (UUT)
39
   uut: RightShiftReg PORT MAP (
40
          clock => clock,
41
          enable => enable,
42
          shift => shift,
43
          din => din,
44
          dout => dout
45
        );
46
 
47
   -- Clock process definitions
48
   clock_process :process
49
   begin
50
                clock <= '0';
51
                wait for clock_period/2;
52
                clock <= '1';
53
                wait for clock_period/2;
54
   end process;
55
 
56
        enable  <= '1' after clock_period*2 ,'0' after clock_period*3;
57
        shift           <= '1' after clock_period*3 ,'0' after clock_period*7;
58
        din             <= "011001101" after clock_period/2;
59
END;

powered by: WebSVN 2.1.0

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