Latest Post

Ads

Verilog: VLSI Code for T Flip Flop Dataflow Modelling with Testbench Code

Verilog Code for T Flip Flop Dataflow Modelling

module TFF(
input t,
input en,
output q,
output qb
);
 
assign a = ~ ( qb & t & en );
assign b = ~ ( q & t & en );
assign q = ~ ( qb & a );
assign qb = ~ ( b & q & ( ~ t ) );

endmodule
 
//Testbench

initial begin
// Initialize Inputs 
t = 0;
en = 0;
// Wait 100 ns for global reset to finish
#100;
// Add stimulus here 
#100;t = 1;en = 0;
#100;t = 0;en = 1;
#100;t = 1;en = 1;
 
end

Xillinx Output:

T Flip Flop Dataflow Modelling


T Flip Flop Dataflow Modelling

 
Also See:List of Verilog Programs


Comments

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: 4-1 MUX Dataflow Modelling with Testbench

VLSI: Half Subtractor and Full Subtractor Gate Level Modelling

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