fix one too small
[RRG-proxmark3.git] / fpga / mux8.v
blob1918db2d81fb5da20dbc5e3f0e3f299ff8062918
1 //-----------------------------------------------------------------------------
2 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // See LICENSE.txt for the text of the license.
15 //-----------------------------------------------------------------------------
17 // 8 inputs to 1 output multiplexer
18 module mux8(
19 input [2:0] sel,
20 output reg y,
21 input x0, x1, x2, x3, x4, x5, x6, x7
24 always @(*)
25 begin
26 // y = x[sel];
27 case (sel)
28 3'd0: y = x0;
29 3'd1: y = x1;
30 3'd2: y = x2;
31 3'd3: y = x3;
32 3'd4: y = x4;
33 3'd5: y = x5;
34 3'd6: y = x6;
35 3'd7: y = x7;
36 endcase
37 end
39 endmodule