2-to-1 bus multiplexer

题目如下:

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 );
    assign out=(sel)?b:a;
endmodule

posted @ 2024-03-12 15:46  江左子固  阅读(9)  评论(0)    收藏  举报