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

Subversion Repositories generic_parameterized_mux

[/] [generic_parameterized_mux/] [trunk/] [rtl/] [Nx1_mux.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 Kanish
 
2
////////////////////////////////////////////////////////////////// ////
3
//// ////
4
 
5
//// ////
6
//// This file is part of the XXX project ////
7
//// http://www.opencores.org/cores/xxx/ ////
8
//// ////
9
//// Description ////
10
//// Implementation of Genric Nx1 parameterized Multiplexer. ////
11
//// ////
12
//// To Do: ////
13
//// - ////
14
//// ////
15
//// Author(s): ////
16
//// - Kanish R, Kanish@opencores.org ////
17
//// ////
18
//////////////////////////////////////////////////////////////////////
19
//// ////
20
//// Copyright (C) 2009 Authors and OPENCORES.ORG ////
21
//// ////
22
//// This source file may be used and distributed without ////
23
//// restriction provided that this copyright statement is not ////
24
//// removed from the file and that any derivative work contains ////
25
//// the original copyright notice and the associated disclaimer. ////
26
//// ////
27
//// This source file is free software; you can redistribute it ////
28
//// and/or modify it under the terms of the GNU Lesser General ////
29
//// Public License as published by the Free Software Foundation; ////
30
//// either version 2.1 of the License, or (at your option) any ////
31
//// later version. ////
32
//// ////
33
//// This source is distributed in the hope that it will be ////
34
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
35
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
36
//// PURPOSE. See the GNU Lesser General Public License for more ////
37
//// details. ////
38
//// ////
39
//// You should have received a copy of the GNU Lesser General ////
40
//// Public License along with this source; if not, download it ////
41
//// from http://www.opencores.org/lgpl.shtml ////
42
//// //// ///
43
///////////////////////////////////////////////////////////////////
44
 
45
 
46
module Nx1_mux(D,Y,S);
47
parameter N=2;
48
input [N-1:0]D;
49
input [$clog2(N)-1:0]S;
50
integer i;
51
output reg Y;
52
always @(*) begin
53
    Y=D[S];
54
end
55
endmodule

powered by: WebSVN 2.1.0

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