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

Subversion Repositories sata_controller_core

[/] [sata_controller_core/] [trunk/] [sata2_fifo_v1_00_a/] [hdl/] [verilog/] [mux_21.v] - Blame information for rev 13

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ashwin_men
//--------------------------------------------------------------------------------
2
// Entity   mux_21 
3
// Version: 1.0
4
// Author:  Ashwin Mendon 
5
// Description: 2 bit 2:1 Multiplexer
6
//--------------------------------------------------------------------------------
7
 
8
// Copyright (C) 2012
9
// Ashwin A. Mendon
10
//
11
// This file is part of SATA2 core.
12
//
13
// This program is free software; you can redistribute it and/or modify
14
// it under the terms of the GNU General Public License as published by
15
// the Free Software Foundation; either version 3 of the License, or
16
// (at your option) any later version.
17
//
18
// This program is distributed in the hope that it will be useful,
19
// but WITHOUT ANY WARRANTY; without even the implied warranty of
20
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
// GNU General Public License for more details.
22
//
23
// You should have received a copy of the GNU General Public License
24
// along with this program.  If not, see <http://www.gnu.org/licenses/>.  
25
 
26
 
27
module mux_21
28
   (
29
    input wire [1:0] a,
30
    input wire [1:0] b,
31
    input wire   sel,
32
    output reg [1:0] o
33
    );
34
 
35
  always @ (a or b or sel)
36
  begin
37
    case (sel)
38
      1'b0:
39
          o = a;
40
      1'b1:
41
          o = b;
42
    endcase
43
  end
44
 
45
endmodule
46
 

powered by: WebSVN 2.1.0

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