Latest Post

Ads

VLSI: Binary to Gray and Gray to Binary Converter Gate Level Modelling

Binary to Gray:

module Binary_to_Gray(
    input b1,
    input b2,
    input b3,
    input b4,
    output g1,
    output g2,
    output g3,
    output g4
    );
xor u1(g2,b1,b2);
xor u2(g3,b2,b3);
xor u3(g4,b4,b3);
buf u4(g1,b1);

endmodule




Gray to Binary:

module GraytoBinary(

    input g1,
    input g2,
    input g3,
    input g4,
    output b1,
    output b2,
    output b3,
    output b4
    );
xor u1(b4,g1,b3);
xor u2(b3,g3,b2);
xor u3(b2,g2,g1);
buf u4(b1,g1);

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