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

Subversion Repositories uart_fpga_slow_control_migrated

[/] [uart_fpga_slow_control/] [trunk/] [code/] [library/] [gh_register_ce.vhd] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 aborga
-----------------------------------------------------------------------------
2
--      Filename:       gh_register_ce.vhd
3
--
4
--      Description:
5
--              register with clock enable
6
--
7
--      Copyright (c) 2005 by George Huber 
8
--              an OpenCores.org Project
9
--              free to use, but see documentation for conditions 
10
--
11
--      Revision        History:
12
--      Revision        Date            Author          Comment
13
--      --------        ----------      ---------       -----------
14
--      1.0             09/03/05        G Huber         Initial revision
15
--      2.0             09/17/05        h lefevre       name change to avoid conflict
16
--                                                        with other librarys
17
--
18
-----------------------------------------------------------------------------
19
LIBRARY ieee;
20
USE ieee.std_logic_1164.all;
21
 
22
ENTITY gh_register_ce IS
23
        GENERIC (size: INTEGER := 8);
24
        PORT(
25
                clk : IN                STD_LOGIC;
26
                rst : IN                STD_LOGIC;
27
                CE  : IN                STD_LOGIC; -- clock enable
28
                D   : IN                STD_LOGIC_VECTOR(size-1 DOWNTO 0);
29
                Q   : OUT               STD_LOGIC_VECTOR(size-1 DOWNTO 0)
30
                );
31
END gh_register_ce;
32
 
33
ARCHITECTURE a OF gh_register_ce IS
34
 
35
 
36
BEGIN
37
 
38
PROCESS (clk,rst)
39
BEGIN
40
        if (rst = '1') then
41
                Q <= (others =>'0');
42
        elsif (rising_edge (clk)) then
43
                if (CE = '1') then
44
                        Q <= D;
45
                end if;
46
        end if;
47
END PROCESS;
48
 
49
END a;
50
 

powered by: WebSVN 2.1.0

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