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

Subversion Repositories cowgirl

[/] [cowgirl/] [trunk/] [mux_8_1.vhdl] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 thebeekeep
library ieee;
2
use ieee.std_logic_1164.all;
3
 
4
entity mux_8_1 is port(
5
        a:      in std_logic_vector(15 downto 0);
6
        b:      in std_logic_vector(15 downto 0);
7
        c:      in std_logic_vector(15 downto 0);
8
        d:      in std_logic_vector(15 downto 0);
9
        e:      in std_logic_vector(15 downto 0);
10
        f:      in std_logic_vector(15 downto 0);
11
        g:      in std_logic_vector(15 downto 0);
12
        h:      in std_logic_vector(15 downto 0);
13
        sel:    in std_logic_vector(2 downto 0);
14
        o:      out std_logic_vector(15 downto 0)
15
);
16
end mux_8_1;
17
 
18
architecture mux8_arch of mux_8_1 is
19
begin
20
        process(sel, a, b)
21
        begin
22
                if sel = "000" then
23
                        o <= a;
24
                elsif sel = "001" then
25
                        o <= b;
26
                elsif sel = "010" then
27
                        o <= c;
28
                elsif sel = "011" then
29
                        o <= d;
30
                elsif sel = "100" then
31
                        o <= e;
32
                elsif sel = "101" then
33
                        o <= f;
34
                elsif sel = "110" then
35
                        o <= g;
36
                elsif sel = "111" then
37
                        o <= h;
38
                end if;
39
        end process;
40
end mux8_arch;

powered by: WebSVN 2.1.0

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