[Verilog] Multiplexer
https://hdlbits.01xz.net/wiki/Problem_sets Problem sets - HDLBits hdlbits.01xz.net Mux2to1v sel 0이면 a, 1이면 b module top_module( input [99:0] a, b, input sel, output [99:0] out ); assign out = (sel? b: a); endmodule Mux9to1v sel 0:a, 1:b,..., 8:d 이고 그외는 1111_1111_1111_1111 module top_module( input [15:0] a, b, c, d, e, f, g, h, i, input [3:0] sel, output reg [15:0] out ); //always는 reg가 필요함 alway..
2022. 12. 21.