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

Subversion Repositories mips_enhanced

[/] [mips_enhanced/] [trunk/] [grlib-gpl-1.0.19-b3188/] [lib/] [gaisler/] [leon3/] [my_mux.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimamali
----------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer: 
4
-- 
5
-- Create Date:    11:01:23 07/26/2009 
6
-- Design Name: 
7
-- Module Name:    my_mux - 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
use IEEE.STD_LOGIC_ARITH.ALL;
23
use IEEE.STD_LOGIC_UNSIGNED.ALL;
24
--library gaisler;
25
--use gaisler.libiu.all; 
26
---- Uncomment the following library declaration if instantiating
27
---- any Xilinx primitives in this code.
28
--library UNISIM;
29
--use UNISIM.VComponents.all;
30
 
31
entity my_mux is
32
    Port ( a : in  STD_LOGIC_VECTOR (31 downto 0);
33
           b : in  STD_LOGIC_VECTOR (31 downto 0);
34
           c : in  STD_LOGIC_VECTOR (31 downto 0);
35
           d : in  STD_LOGIC_VECTOR (31 downto 0);
36
           sel : in  STD_LOGIC_VECTOR (1 downto 0);
37
           res : out  STD_LOGIC_VECTOR (31 downto 0));
38
end my_mux;
39
 
40
architecture RTL of my_mux is
41
begin
42
 SEL_PROCESS:process (a,b,c,d,sel)
43
 begin
44
        case sel is
45
                when "00" => res<=a;
46
                when "01" => res<=b;
47
                when "10" => res<=c;
48
                when others => res<=d;
49
        end case;
50
end process SEL_PROCESS;
51
end RTL;

powered by: WebSVN 2.1.0

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