OpenCores
URL https://opencores.org/ocsvn/vhdl-pipeline-mips/vhdl-pipeline-mips/trunk

Subversion Repositories vhdl-pipeline-mips

[/] [vhdl-pipeline-mips/] [trunk/] [1_instruction_fetching/] [reg.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 elujan
--
2
-- Registro concencional para implementación del Program Counter (PC)
3
--
4
-- Licencia: Copyright 2008 Emmanuel Luján
5
--
6
--      This program is free software; you can redistribute it and/or
7
--      modify it under the terms of the GNU General Public License as
8
--      published by the Free Software Foundation; either version 2 of
9
--      the License, or (at your option) any later version. This program
10
--      is distributed in the hope that it will be useful, but WITHOUT
11
--      ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12
--      or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
13
--      License for more details. You should have received a copy of the
14
--      GNU General Public License along with this program; if not, write
15
--      to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
16
--      Boston, MA 02110-1301 USA.
17
-- 
18
-- Autor:       Emmanuel Luján
19
-- Email:       info@emmanuellujan.com.ar
20
-- Versión:    1.0
21
--
22
 
23
library IEEE;
24
use IEEE.STD_LOGIC_1164.all;
25
use IEEE.numeric_std.all;
26
 
27
 
28
entity REG is
29
        generic (N: NATURAL); -- N = tam. dir.    
30
        port(
31
                CLK             : in    STD_LOGIC;                      -- Reloj                        
32
                RESET           : in    STD_LOGIC;                      -- Reset asincrónico
33
                DATA_IN         : in    STD_LOGIC_VECTOR(N-1 downto 0);  -- Datos de entrada
34
                DATA_OUT        : out   STD_LOGIC_VECTOR(N-1 downto 0)   -- Datos de salida
35
        );
36
end REG;
37
 
38
architecture REG_ARC of REG is
39
begin
40
        SYNC_REG:
41
                process(CLK,RESET,DATA_IN)
42
                begin
43
                        if(RESET = '1') then
44
                                DATA_OUT <= (others => '0');
45
                        elsif rising_edge(CLK) then
46
                                DATA_OUT <= DATA_IN;
47
                        end if;
48
                end process;
49
end REG_ARC;

powered by: WebSVN 2.1.0

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