Latest Post

Ads

VLSI: Excess 3 to BCD Converter Dataflow Modelling with Testbench

Verilog Code for Excess 3 to BCD Dataflow Modelling


module ex3_bcd(

    input w,

    input x,

    input y,

    input z,

    output a,

    output b,

    output c,

    output d

    );

              assign  a = ((w & x) | (w & y & z));

              assign b = (((~x) & (~y)) | ((~x) & (~z)) | (x & y & z));

              assign c = (((~y) & z) | (y & (~z)));

              assign d = ~z;

endmodule

//Testbench code for Excess 3 to BCD Dataflow Modelling

initial begin

                             // Initialize Inputs

                             w = 0;

                             x = 0;

                             y = 0;

                             z = 0;                  

            // Wait 100 ns for global reset to finish

                             #100;

                             // Add stimulus here

                             #100; w = 0; x = 0; y = 1; z = 1;

                             #100; w = 0; x = 1; y = 0; z = 1;                   

 end


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