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

Subversion Repositories hicovec

[/] [hicovec/] [trunk/] [cpu/] [units/] [multiplexer4.vhd] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 hmanske
------------------------------------------------------------------
2 4 hmanske
-- PROJECT:      HiCoVec (highly configurable vector processor)
3 2 hmanske
--
4
-- ENTITY:      multiplexer4
5
--
6
-- PURPOSE:     multiplexer, four inputs
7
--              one output
8
--
9
-- AUTHOR:      harald manske, haraldmanske@gmx.de
10
--
11
-- VERSION:     1.0
12
-----------------------------------------------------------------
13
library ieee;
14
use ieee.std_logic_1164.all;
15
use ieee.std_logic_arith.all;
16
use ieee.numeric_std.all;
17
 
18
entity multiplexer4 is
19
    generic (
20
        w : positive
21
    );
22
    port (
23
        selector:    in std_logic_vector(1 downto 0);
24
        data_in_00:  in std_logic_vector(w-1 downto 0);
25
        data_in_01:  in std_logic_vector(w-1 downto 0);
26
        data_in_10:  in std_logic_vector(w-1 downto 0);
27
        data_in_11:  in std_logic_vector(w-1 downto 0);
28
        data_out:    out std_logic_vector(w-1 downto 0)
29
    );
30
end multiplexer4;
31
 
32
architecture rtl of multiplexer4 is
33
begin
34
   data_out <=  data_in_00 when selector = "00" else
35
                data_in_01 when selector = "01" else
36
                data_in_10 when selector = "10" else
37
                data_in_11;
38
end rtl;
39
 

powered by: WebSVN 2.1.0

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