summaryrefslogtreecommitdiff
path: root/usrp2/fpga/control_lib/mux4.v
blob: 31c85c832ef3c5b0dc0251458c8ee0c199af13db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16


module mux4
  #(parameter WIDTH=32, parameter DISABLED=0)
    (input en,
     input [1:0] sel,
     input [WIDTH-1:0] i0,
     input [WIDTH-1:0] i1,
     input [WIDTH-1:0] i2,
     input [WIDTH-1:0] i3,
     output [WIDTH-1:0] o);

   assign 		o = en ? (sel[1] ? (sel[0] ? i3 : i2) : (sel[0] ? i1 : i0)) :
			DISABLED;
   
endmodule // mux4