Design of D-Flip Flop using Behavior Modeling Style -
Output Waveform : D Flip Flop |
Verilog CODE -
//-----------------------------------------------------------------------------
//
// Title : d_flip_flop
// Design : verilog upload 2
// Author : Naresh Singh Dobal
// Company : nsdobal@gmail.com
// Verilog Programs & Exercise by Naresh Singh Dobal.
//
//-----------------------------------------------------------------------------
//
// File : D flip flop using behavior modeling style.v
module d_flip_flop ( din ,clk ,reset ,dout );
output dout ;
reg dout ;
input din ;
wire din ;
input clk ;
wire clk ;
input reset ;
wire reset ;
always @ (posedge (clk)) begin
if (reset)
dout <= 0;
else
dout <= din ;
end
endmodule
4 comments :
please give me the verilog code for 8bit D flipflop..
why alwways@(posedge clock)
Always no change condition negedge clk
You can chose also at negative clock no ussie whatever you want
Post a Comment