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

Subversion Repositories sata_controller_core

[/] [sata_controller_core/] [trunk/] [sata2_bus_v1_00_a/] [base_system/] [pcores/] [sata_core_v1_00_a/] [hdl/] [vhdl/] [mux_161.vhd] - Blame information for rev 11

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 11 ashwin_men
-- Copyright (C) 2012
2
-- Ashwin A. Mendon
3
--
4
-- This file is part of SATA2 core.
5
--
6
-- This program is free software; you can redistribute it and/or modify
7
-- it under the terms of the GNU General Public License as published by
8
-- the Free Software Foundation; either version 3 of the License, or
9
-- (at your option) any later version.
10
--
11
-- This program is distributed in the hope that it will be useful,
12
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
13
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
-- GNU General Public License for more details.
15
--
16
-- You should have received a copy of the GNU General Public License
17
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.  
18
 
19
 
20
--------------------------------------------------------------------------------
21
-- Entity   mux_161 
22
-- Version: 1.0
23
-- Author:  Ashwin Mendon 
24
-- Description: 32 bit 16:1 Multiplexer
25
--
26
--------------------------------------------------------------------------------
27
library IEEE;
28
use IEEE.STD_LOGIC_1164.ALL;
29
use IEEE.STD_LOGIC_ARITH.ALL;
30
use IEEE.STD_LOGIC_UNSIGNED.ALL;
31
 
32
 
33
entity mux_161 is
34
  generic(
35
           DATA_WIDTH: natural := 32
36
         );
37
 
38
  port(
39
    a      : in  std_logic_vector(DATA_WIDTH-1 downto 0);
40
    b      : in  std_logic_vector(DATA_WIDTH-1 downto 0);
41
    c      : in  std_logic_vector(DATA_WIDTH-1 downto 0);
42
    d      : in  std_logic_vector(DATA_WIDTH-1 downto 0);
43
    e      : in  std_logic_vector(DATA_WIDTH-1 downto 0);
44
    f      : in  std_logic_vector(DATA_WIDTH-1 downto 0);
45
    g      : in  std_logic_vector(DATA_WIDTH-1 downto 0);
46
    h      : in  std_logic_vector(DATA_WIDTH-1 downto 0);
47
    i      : in  std_logic_vector(DATA_WIDTH-1 downto 0);
48
    j      : in  std_logic_vector(DATA_WIDTH-1 downto 0);
49
    k      : in  std_logic_vector(DATA_WIDTH-1 downto 0);
50
    l      : in  std_logic_vector(DATA_WIDTH-1 downto 0);
51
    m      : in  std_logic_vector(DATA_WIDTH-1 downto 0);
52
    n      : in  std_logic_vector(DATA_WIDTH-1 downto 0);
53
    o      : in  std_logic_vector(DATA_WIDTH-1 downto 0);
54
    p      : in  std_logic_vector(DATA_WIDTH-1 downto 0);
55
    sel    : in  std_logic_vector(3 downto 0);
56
    output : out std_logic_vector(DATA_WIDTH-1 downto 0)
57
    );
58
end mux_161;
59
 
60
architecture mux_behav of mux_161 is
61
begin
62
  process(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,sel)
63
  begin
64
    case (sel) is
65
     when "0000" =>
66
        output <= a;
67
     when "0001" =>
68
        output <= b;
69
     when "0010" =>
70
        output <= c;
71
     when "0011" =>
72
        output <= d;
73
     when "0100" =>
74
        output <= e;
75
     when "0101" =>
76
        output <= f;
77
     when "0110" =>
78
        output <= g;
79
     when "0111" =>
80
        output <= h;
81
     when "1000" =>
82
        output <= i;
83
     when "1001" =>
84
        output <= j;
85
     when "1010" =>
86
        output <= k;
87
     when "1011" =>
88
        output <= l;
89
     when "1100" =>
90
        output <= m;
91
     when "1101" =>
92
        output <= n;
93
     when "1110" =>
94
        output <= o;
95
     when others =>
96
        output <= p;
97
    end case;
98
  end process;
99
end mux_behav;
100
 

powered by: WebSVN 2.1.0

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