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

Subversion Repositories vhdl-pipeline-mips

[/] [vhdl-pipeline-mips/] [trunk/] [3_execution/] [alu_control.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 elujan
--
2
-- Control de la ALU del procesador MIPS Segmentado
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.records_pkg.all;
29
 
30
entity ALU_CONTROL is
31
        port(
32
                        --Entradas
33
                        CLK             :       in STD_LOGIC;                           -- Reloj
34
                        FUNCT           :       in STD_LOGIC_VECTOR(5 downto 0); -- Campo de la instrucción FUNC
35
                        ALU_OP_IN       :       in ALU_OP_INPUT;                        -- Señal de control de la Unidad de Control
36
                        --Salidas
37
                        ALU_IN          :       out ALU_INPUT                           -- Entrada de la ALU
38
        );
39
end ALU_CONTROL;
40
 
41
architecture ALU_CONTROL_ARC of ALU_CONTROL is
42
begin
43
 
44
        ALU_IN.Op0 <= ALU_OP_IN.Op1 and ( FUNCT(0) or FUNCT(3) );
45
        ALU_IN.Op1 <= (not ALU_OP_IN.Op1) or (not FUNCT(2));
46
        ALU_IN.Op2 <= ALU_OP_IN.Op0 or ( ALU_OP_IN.Op1 and FUNCT(1) );
47
        ALU_IN.Op3 <= ALU_OP_IN.Op2;
48
 
49
end ALU_CONTROL_ARC;

powered by: WebSVN 2.1.0

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