Files
nand2tetris_verilog/mux8way16.v
2024-06-13 18:28:20 -07:00

19 lines
558 B
Verilog

`ifndef _mux8way16_v
`define _mux8way16_v
`include "mux8way.v"
module Mux8Way16 (input [15:0] a, input [15:0] b, input [15:0] c, input [15:0] d,
input [15:0] e, input [15:0] f, input [15:0] g, input [15:0] h,
input [2:0] sel, output [15:0] out);
genvar i;
generate
for (i=0; i<16; i=i+1)
Mux8Way u1 (.a(a[i]), .b(b[i]), .c(c[i]), .d(d[i]),
.e(e[i]), .f(f[i]), .g(g[i]), .h(h[i]),
.sel(sel), .out(out[i]));
endgenerate
endmodule
`endif