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

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