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/] [if_id_registers.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 elujan
--
2
-- Registros de sinctonización entre las etapas IF e ID
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
library work;
28
use work.segm_mips_const_pkg.all;
29
 
30
 
31
entity IF_ID_REGISTERS is
32
    port(
33
                CLK             : in    STD_LOGIC;                      -- Reloj
34
                RESET           : in    STD_LOGIC;                      -- Reset asincrónico
35
                NEW_PC_ADDR_IN  : in    STD_LOGIC_VECTOR(INST_SIZE-1 downto 0);  -- Salida del sumador
36
                INST_REG_IN     : in    STD_LOGIC_VECTOR(INST_SIZE-1 downto 0);  -- Salida de la Memoria de Instrucción
37
                NEW_PC_ADDR_OUT : out   STD_LOGIC_VECTOR(INST_SIZE-1 downto 0);  -- Salida del sumador sincronizada
38
                INST_REG_OUT    : out   STD_LOGIC_VECTOR(INST_SIZE-1 downto 0)   -- Salida de la Memoria de Instrucción sincronizada
39
        );
40
end IF_ID_REGISTERS;
41
 
42
architecture IF_ID_REGISTERS_ARC of IF_ID_REGISTERS is
43
begin
44
        SYNC_IF_ID:
45
                process(CLK,RESET,NEW_PC_ADDR_IN,INST_REG_IN)
46
                begin
47
                        if RESET = '1' then
48
                                NEW_PC_ADDR_OUT <= (others => '0');
49
                                INST_REG_OUT    <= (others => '0');
50
                        elsif rising_edge(CLK) then
51
                                NEW_PC_ADDR_OUT <= NEW_PC_ADDR_IN;
52
                                INST_REG_OUT<= INST_REG_IN;
53
                        end if;
54
                end process;
55
end IF_ID_REGISTERS_ARC;

powered by: WebSVN 2.1.0

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