Latest Post

Ads

Verilog: NOT Gate Behavioral Modelling with Testbench Code

 Verilog Code NOT Gate Behavioral Modelling

// main

module NOT_GATE (

input a;

output out );

reg out;

always @(a)

begin

if(a==0)

out = 1’b1;

else

out = 1’b0;

endmodule

// test-bench

initial begin

a=0;

#100;

//wait 100ns for global reset to finish

//add stimulus here

#100 a=0;

#100 a=1;

end

initial begin

#100 $monitor(“a=%b, out=%b”, a, out);

end

endmodule


Xilinx Output:
Verilog Code Not Gate Behavioral Modelling with Testbench
Not Gate Behavioral Modelling


Comments

Ads

Popular posts from this blog

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

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

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

VLSI: 4-1 MUX Dataflow Modelling with Testbench

VLSI: 2 Bit Magnitude Comparator Dataflow Modelling