Latest Post

Ads

VLSI: Logic Gates Dataflow Modelling

AND Gate:


Verilog Module Code:

module and_gate(
    input a,
    input b,
    output c );
assign c = a & b;
endmodule


OR Gate:

Verilog Module Code:

module or_gate(
    input a,
    input b,
    output c );
assign c = a | b;
endmodule


NAND Gate:


Verilog Module Code:

module nand_gate(
    input a,
    input b,
    output c );
assign c = ~ ( a & b );
endmodule


NOR Gate:

Verilog Module Code:

module nor_gate(
    input a,
    input b,
    output c );
assign c = ~ ( a | b );
endmodule


XOR Gate:

Verilog Module Code:

module xor_gate(
    input a,
    input b,
    output c );
assign c = a  ^  b ;
endmodule


XNOR Gate:


Verilog Module Code:

 module xnor_gate(
    input a,
    input b,
    output c );
assign c = ~ ( a  ^  b ) ;
endmodule


NOT Gate:

Verilog Module Code:

module not_gate(
    input a,
    output c );
assign c = ~ a ;
endmodule

Ads

Popular posts from this blog

1 to 4 DEMUX (Demultiplexer) Verilog CodeStructural/Gate Level Modelling with Testbench

VLSI: 2 Bit Magnitude Comparator Dataflow Modelling

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

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

VLSI: Half Subtractor and Full Subtractor Gate Level Modelling