Archived
1
0
This repository has been archived on 2026-02-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
iceberg/gates/mux4way16.v
T
2022-03-04 01:38:03 +01:00

27 lines
546 B
Verilog

'include "and16.v"
'include "not16.v"
'include "or4way.v"
module mux4way16(out, i0, i1, i2, i3, sel);
input [15:0]i0;
input [15:0]i1;
input [15:0]i2;
input [15:0]i3;
input [1:0]sel;
output [15:0]out;
wire [15:0]tmp0;
wire [15:0]tmp1;
wire [15:0]tmp2;
wire [15:0]tmp3;
wire [2:0] [15:0] sel16 = sel;
not16(notSel16, sel16);
and16(tmp0, i0, notSel16);
and16(tmp1, i1, sel16);
and16(tmp2, i2, notSel16);
and16(tmp3, i3, sel16);
or4way16(out, tmp0, tmp1, tmp2, tmp3);
endmodule