2X1 Multiplexer
Boolean Equation Y = I0 if {S = 0} Y = I1 if {S = 1} Truth Table Dataflow Modeling module mux_21(I0,I1,S,Y); input I0,I1,S; output Y; assign Y = (S)?I1:I0; endmodule Behavioral Modeling module mux_21(I0,I1,S,Y); input I0,I1,S; output Y; reg Y; always@(I0 or I1 or S) begin if(S == 1'b1) Y = I1; else Y = I0; end endmodule Case Statement module mux_21(I0,I1,S,Y); input I0,I1,S; output Y; reg Y; always@(I0 or I1 or S) begin case(S) 1'b1 : Y = I1; 1'b0 : Y = I0; endcase end...

.jpg)
Comments
Post a Comment