Merge pull request #2616 from jmichelp/fix14b
[RRG-proxmark3.git] / fpga / mux2_oneout.v
blobd312b68c63ca9a353a900cc68845131f8c021fa7
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 // 1 input to 2 outputs multiplexer
18 module mux2_oneout(
19 input [1:0] sel,
20 input y,
21 output reg x0,
22 output reg x1
25 always @(*)
26 begin
27 case (sel)
28 1'b0: x1 = y;
29 1'b1: x0 = y;
30 endcase
31 end
33 endmodule