Subscribe Us

Header Ads

Write RTL for 8x1 Mux using For loop.

  

//8:1 mux using for loop RTL

 

module mux_8x1for(i,s,y);

 

input [7:0]i;

input [2:0]s;

output reg y;

integer j;

 

always@(*)

begin  

    y=0;

        for(j=0;j<8;j=j+1)

            begin

                if(s==j)

                y=i[j];

            end

end

 

endmodule


Post Your doubt in mail.👇👇👇

  E-Mail:-denilvaghasiya17@gmail.com


Post a Comment

0 Comments