Latest Post

Ads

VLSI: 2-4 Decoder Dataflow Modelling with Testbench

Verilog Code for 2-4 Decoder Dataflow Modelling


module decoder_2_to_4(

    input a0,

    input a1,

    output d0,

    output d1,

    output d2,

    output d3

    );

              assign an0 = ~ a0;

assign an1 = ~ a1;

              assign d0 = an0 & an1;

assign d1 = a0 & an1;

assign d2 = an0 & a1;

assign d3 = a0 & a1;

endmodule


//Testbench code for 2-4 Decoder Dataflow Modelling

initial begin

                             // Initialize Inputs

                             a0 = 0;a1 = 0;

                             // Wait 100 ns for global reset to finish

                             #100;

                             // Add stimulus here

                             #100; a0=1;a1=0;

                             #100; a0=0;a1=1;

                             #100; a0=1;a1=1;

 end


Output:
VLSI: 2-4 Decoder Dataflow Modelling with Testbench



Comments

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: 4-1 MUX Dataflow Modelling with Testbench

VLSI: Half Subtractor and Full Subtractor Gate Level Modelling

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