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

Subversion Repositories mips_fault_tolerant

[/] [mips_fault_tolerant/] [trunk/] [source/] [Mux_4_1.vhd] - Blame information for rev 67

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 jimi39
----------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer: 
4
-- 
5
-- Create Date:    20:45:11 04/22/2012 
6
-- Design Name: 
7
-- Module Name:    Mux_4_1 - Behavioral 
8
-- Project Name: 
9
-- Target Devices: 
10
-- Tool versions: 
11
-- Description: 
12
--
13
-- Dependencies: 
14
--
15
-- Revision: 
16
-- Revision 0.01 - File Created
17
-- Additional Comments: 
18
--
19
----------------------------------------------------------------------------------
20
library IEEE;
21
use IEEE.STD_LOGIC_1164.ALL;
22
 
23
-- Uncomment the following library declaration if using
24
-- arithmetic functions with Signed or Unsigned values
25
--use IEEE.NUMERIC_STD.ALL;
26
 
27
-- Uncomment the following library declaration if instantiating
28
-- any Xilinx primitives in this code.
29
--library UNISIM;
30
--use UNISIM.VComponents.all;
31
 
32
entity Mux_4_1 is
33
Generic (
34
         busw : integer := 31
35
);
36
    Port (
37
                Logic_out : in  std_logic_vector(busw downto 0);
38
           Adder_out : in  std_logic_vector(busw downto 0);
39
                          Shift_out : in  std_logic_vector(busw downto 0);
40
                          Slt_out : in  std_logic_vector(busw downto 0);
41
           ALUmux : in  std_logic_vector(1 downto 0);
42
           Mux_out : out std_logic_vector(busw downto 0));
43
end Mux_4_1;
44
 
45
architecture Behavioral of Mux_4_1 is
46
begin
47
mux_4_1:process(ALUmux,Logic_out,Adder_out,Shift_out,Slt_out)
48
 
49
begin
50
 
51
 
52
                  case ALUmux is
53
                       when "10"   => Mux_out <=  Adder_out;
54
                                 when "01"   => Mux_out <=  Slt_out;
55
                                 when "00"   => Mux_out <=  Shift_out;
56
                                 when "11"   => Mux_out <=  Logic_out;
57
                                 when others => Mux_out <= (others =>'0');
58
                        end case;
59
 
60
end process mux_4_1;
61
 
62
end Behavioral;
63
 

powered by: WebSVN 2.1.0

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