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

Subversion Repositories hwlu

[/] [hwlu/] [trunk/] [rtl/] [vhdl/] [mux2_1.vhd] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 kavi
----==============================================================----
2
----                                                              ----
3
---- Filename: mux2_1.vhd                                         ----
4
---- Module description: 2-to-1 DW-bit multiplexer                ----
5
----                                                              ----
6
---- Author: Nikolaos Kavvadias                                   ----
7
----         nkavv@skiathos.physics.auth.gr                       ----
8
----                                                              ---- 
9
----                                                              ----
10
---- Downloaded from: http://wwww.opencores.org/cores/hwlu        ----
11
----                                                              ----
12
---- To Do:                                                       ----
13
----         Probably remains as current                          ---- 
14
----         (to promote as stable version)                       ----
15
----                                                              ----
16
---- Author: Nikolaos Kavvadias                                   ----
17
----         nkavv@skiathos.physics.auth.gr                       ----
18
----                                                              ----
19
----==============================================================----
20
----                                                              ----
21
---- Copyright (C) 2004 Nikolaos Kavvadias                        ----
22
----                    nick-kavi.8m.com                          ----
23
----                    nkavv@skiathos.physics.auth.gr            ----
24
----                    nick_ka_vi@hotmail.com                    ----
25
----                                                              ----
26
---- This source file may be used and distributed without         ----
27
---- restriction provided that this copyright statement is not    ----
28
---- removed from the file and that any derivative work contains  ----
29
---- the original copyright notice and the associated disclaimer. ----
30
----                                                              ----
31
---- This source file is free software; you can redistribute it   ----
32
---- and/or modify it under the terms of the GNU Lesser General   ----
33
---- Public License as published by the Free Software Foundation; ----
34
---- either version 2.1 of the License, or (at your option) any   ----
35
---- later version.                                               ----
36
----                                                              ----
37
---- This source is distributed in the hope that it will be       ----
38
---- useful, but WITHOUT ANY WARRANTY; without even the implied   ----
39
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ----
40
---- PURPOSE. See the GNU Lesser General Public License for more  ----
41
---- details.                                                     ----
42
----                                                              ----
43
---- You should have received a copy of the GNU Lesser General    ----
44
---- Public License along with this source; if not, download it   ----
45
---- from <http://www.opencores.org/lgpl.shtml>                   ----
46
----                                                              ----
47
----==============================================================----
48
--
49
-- CVS Revision History
50
--    
51
 
52
library IEEE;
53
use IEEE.std_logic_1164.all;
54
 
55
 
56
entity mux2_1 is
57
  generic (
58
    DW : integer := 8
59
  );
60
  port (
61
    in0  : in std_logic_vector(DW-1 downto 0);
62
    in1  : in std_logic_vector(DW-1 downto 0);
63
    sel  : in std_logic;
64
        mout : out std_logic_vector(DW-1 downto 0)
65
  );
66
end mux2_1;
67
 
68
 
69
architecture rtl of mux2_1 is
70
begin
71
  process (sel, in0, in1)
72
  begin
73
          case sel is
74
                  when '0' => mout <= in0;
75
                  when others => mout <= in1;
76
          end case;
77
  end process;
78
  --
79
end rtl;

powered by: WebSVN 2.1.0

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