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

Subversion Repositories hicovec

[/] [hicovec/] [branches/] [avendor/] [cpu/] [units/] [multiplexer2.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:      multiplexer2
5
--
6
-- PURPOSE:     multiplexer, two 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 multiplexer2 is
19
    generic (
20
        w : positive -- word width
21
    );
22
    port (
23
        selector:   in std_logic;
24
        data_in_0:  in std_logic_vector(w-1 downto 0);
25
        data_in_1:  in std_logic_vector(w-1 downto 0);
26
        data_out:   out std_logic_vector(w-1 downto 0)
27
    );
28
end multiplexer2;
29
 
30
architecture rtl of multiplexer2 is
31
begin
32
   data_out <=  data_in_0 when selector = '0' else
33
                data_in_1;
34
end rtl;
35
 

powered by: WebSVN 2.1.0

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