in the beginning i give a clear pulse to the d-ff then i need it give a delayed value of the previous output .
Can any body help me by this verilog code
P.S.: I didn't see, that the always block misses an edge sensitive condition. It can't work.
A standard DFF with positive clock edge and low active clear looks like this:
Code:
always @ (posedge C or negedge CLR)
if (~CLR) begin
Q <= 1'b0;
end else begin
Q <= D;
end