Latest Post

VLSI: Logic Gates Gate Level Modelling

AND Gate:


Verilog Module Code:

module and_gate(
    input a,
    input b,
    output c );
and (c,a,b);
endmodule


OR Gate:

Verilog Module Code:

module or_gate(
    input a,
    input b,
    output c );
or (c,a,b);
endmodule


NAND Gate:


Verilog Module Code:

module nand_gate(
    input a,
    input b,
    output c );
nand (c,a,b);
endmodule


NOR Gate:

Verilog Module Code:

module nor_gate(
    input a,
    input b,
    output c );
nor (c,a,b);
endmodule


XOR Gate:

Verilog Module Code:

module xor_gate(
    input a,
    input b,
    output c );
xor (c,a,b);
endmodule


XNOR Gate:


Verilog Module Code:

 module xnor_gate(
    input a,
    input b,
    output c );
xnor (c,a,b);
endmodule


NOT Gate:

Verilog Module Code:

module not_gate(
    input a,
    output c );
not (c,a);
endmodule

Popular posts from this blog

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

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

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

Verilog: 4 to 2 Encoder Behavioral Modelling using Case Statement with Testbench Code

VLSI: 8-3 Encoder Dataflow Modelling with Testbench