Latest Post

Ads

VLSI: 4-1 Multiplexer (MUX) Dataflow Modelling

module Four_to_One_MUX(
    input s0,
    input s1,
    input i0,
    input i1,
    input i2,
    input i3,
    output out
    );
assign y0 = (i0 & (~s0) & (~s1));
assign y1 = (i1 & (~s0) & s1);
assign y2 = (i2 & s0 & (~s1));
assign y3 = (i3 & s0 & s1);
assign out = (y0 | y1 | y2 | y3);

endmodule



MUX using Conditional Statement:


module Four_to_One_MUX(
    input s0,
    input s1,
    input i0,
    input i1,
    input i2,
    input i3,
    output out
    );
assign out = s0 ? (s1 ? i3 : i2) : (s1 ? i1 : i0);


endmodule



             

Ads

Popular posts from this blog

VLSI: BCD to Excess 3 and Excess 3 to BCD Dataflow Modelling

Full Subtractor Verilog Code in Structural/Gate Level Modelling with Testbench

VLSI: 1-4 DEMUX (Demultiplexer) Dataflow Modelling with Testbench

VLSI: 4-1 MUX Dataflow Modelling with Testbench

VLSI: Half Subtractor and Full Subtractor Gate Level Modelling