How to create 4 Clock Cycle delay in design

Status
Not open for further replies.

spartanthewarrior

Full Member level 2
Joined
Jun 13, 2007
Messages
122
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
2,142
Hi all,

How can i create 4 clock cycle delay in my design.
 

Is this what you wanted? Note, you don't really need reset in the delay FFs.

always @(posedge clk) begin
wr_d1 <= #1 wr; // wr is the signal you want to delay
wr_d2 <= #1 wr_d1;
wr_d3 <= #1 wr_d2;
wr_d4 <= #1 wr_d3;
end
 

spartanthewarrior said:
Hi all,

How can i create 4 clock cycle delay in my design.

Use a simple counter.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…