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

Subversion Repositories generic_booth_multipler

[/] [generic_booth_multipler/] [trunk/] [rtl/] [modules/] [00.Regeister.vhd] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alimpk
 
2
library IEEE;
3
use IEEE.STD_LOGIC_1164.ALL;
4
 
5
entity Regeister is
6 6 alimpk
        generic (
7
                size: integer := 4
8
        );
9 2 alimpk
        port(
10 6 alimpk
                clock :in       std_logic;
11 2 alimpk
                enable :in      std_logic;
12 6 alimpk
                reset :in       std_logic;
13
                din      :in    std_logic_vector(size-1 downto 0);
14
                dout :out std_logic_vector(size-1 downto 0));
15 2 alimpk
end Regeister;
16
 
17
architecture Behavioral of Regeister is
18
        signal data :std_logic_vector(din'range):=(OTHERS=>'0');
19
begin
20
        process(clock)
21
        begin
22
                if(clock'event and clock='1')then
23
                        if(reset ='1' )then
24
                                data <=(others =>'0');
25
                        elsif(enable = '1')then
26
                                data <= din;
27
                        else
28
                                data <= data;
29
                        end if;
30
                end if;
31
        end process;
32
        dout <= data;
33
 
34
end Behavioral;
35
 

powered by: WebSVN 2.1.0

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