Forum Discussion
Altera_Forum
Honored Contributor
18 years agoThe best way to figure this out is to draw the waveforms. Then finding the tightest requirement where an edge on the latch clock is greater than an edge on the launch clock. So if going from CLKA to CLKB, we draw the launch clock (A) with launching edges at
0, 12.5, 25, 37.5, 50, 62.5, 75, 87.5, 100... Then we draw the latch clock (B) with latching edges at: 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100... So let's look at a couple launch to latch edges. Launching at 0ns, the nearest latch edge greater than 0 is 10ns, for a setup requirement of 10ns. Launching at 12.5ns, the nearest latch edge greater than 12.5 is at 20, for a requirement of 8.5ns. Continuing in this manner, the closest edges are 37.5 -> 40ns, for a setup requirement of 2.5ns. In the reverse direction, the closest are 10 -> 12.5, once again for a requirement of 2.5ns. A couple quick notes: 1) I find this method much more understandable than equations(equations that deal with periodic functions are usually confusing). I draw them out and just look for the most restrictive edges. 2) The difference is the important thing. You had an earlier post where the launch edge is at 60ns and latch is at 62.5ns. I'm not sure why this occured, but the difference is still 2.5ns so the analysis is the same as if the launch was at 10 and latch at 12.5ns. (Clocks are periodic.) 3) Explaining this, I always get asked, what happens if the launch clock is 10ns and the latch is 1.234ns(i.e. they are not related). TimeQuest will find the most restrictive edges, and you end up with a launch of 643010.00 and a latch of 643010.001, for a 1ps setup requirement(I made those numbers up, but you get the point). The more important question is what should the requirement be? The answer is that they're asynchronous and the user needs to cut timing between the clocks and design for this.