Mux2to1v

2023. 6. 12. 17:31FPGA/HDLBits

728x90

Problem Statement

Create a 100-bit wide, 2-to-1 multiplexer. When sel=0, choose a. When sel=1, choose b.

module top_module( 
    input [99:0] a, b,
    input sel,
    output [99:0] out );
	
    reg [99:0] out_data;
    always @(*) begin
        case (sel)
            1'b0 : out_data = a;
            1'b1 : out_data = b;
        endcase
    end
    assign out = out_data;
endmodule

'FPGA > HDLBits' 카테고리의 다른 글

Mux256to1  (0) 2023.06.12
Mux9to1v  (0) 2023.06.12
Mux2to1  (0) 2023.06.12
Popcount3  (0) 2023.06.12
Thermostat  (0) 2023.06.12