Altera_Forum
Honored Contributor
13 years agoCrossing clock domains, PLL and TimeQuest
Hi everybody,
I worked on one project with one global clock f = 50 MHz. Then I had to modify this project. All logic inside is the same, but now, part of the project is working with clock f = 100 MHz (changed from f = 50 MHz) and the second part, is working, as before, with clock f = 50 MHz. Both clocks are generated from the same PLL in FPGA (Cyclone IV). The problem is that I have a lot of signals which go from one clock domain to the second one (both directions) and TimeQuest shows setup violations. I have not much experience in TQ and clock domains, so I have a few basic questions. 1. I know that I should use FIFOs to properly transfer data between two domains when clocks are asynchronous. But what in situation mentioned above, when I have two related (synchronous) clocks from the same source (PLL), and first clock is just two times faster than the second one? Should I use FIFOs to send signals between domains in situation like this? If no FIFOs are needed, how should I constrain those signals? I see three options: a) do nothing, and TimeQuest will analyze project properly without any additional constraints (just constrain both clocks) b) set multicycle paths between clocks c) set clocks as asynchronous and set false paths between them. Which solution is the best? And what to do when I have two clocks form the same PLL, but not in so simple relation (e.g. clk1 = 50 MHz and clk2 = 155 MHz)? 2. If option a) is corret (I don’t have to use FIFOs and add any new constraints in TQ), it means that something is wrong with my design (because of setup violations), right? So I have to redesign the project? 3. Assume that I have two clocks with the same frequency (in my example 50 MHz), but from two different sources (two different PLLs or two external). When I want to send data from one clock domain to another one, should I use FIFO (probably yes)? Or maybe I have to only constrain properly these paths? If yes, how? 4. Basic situation. Two clocks asynchronous, but some signals are sent between those domains. Of course without FIFO. How to constrain those paths? Use false paths? Use multicycle paths? I’ve found those answers in other similar topics on this forum. Which way is the best? Are there any general rules? If somebody could explain this… I am totally confused…