Altera_Forum
Honored Contributor
11 years agoPLL clock question
Hi all,
I am working on a design using a Cyclone III EP3C25 FPGA, I am having some issues with timing closure and I am trying to understand the information Quartus is reporting. First of all: Quartus version : 13.1.4 Device : EP3C25Q240C8 The design uses 2 PLLs. a) PLL4 takes in a 40MHz clock from pin 89 and converts it to a 160MHz clock b) PLL1 takes in a 160MHz clock from pin 31 on Inclk[0] and the 160MHz output from PLL4 on Inclk[1] and produces 2 output clocks: 160MHz and 40MHz and operates in fail over mode, ie defaults to Inclk[0] but automatically switches over Inclk[1] if Inclk[0] is not present. The entire design runs off the 2 clocks output from PLL1, the two input clocks are only used by the PLLs to generate the internal clocks. Quartus picks up the 2 internal clocks and assigns them as global clocks: 160MHz clock: clk|ref_160_40|altpll_component|auto_generated|pll1|clk[0] 40MHz clock: clk|ref_160_40|altpll_component|auto_generated|pll1|clk[1] What I am not understanding is how Quartus timing analysis is reporting the clocks. The timing analysis seems to report that there are 2 clock networks being generated for each of the above eg: clk|ref_160_40|altpll_component|auto_generated|pll1|clk[0] and clk|ref_160_40|altpll_component|auto_generated|pll1|clk[0]~1 The timing analysis is reporting that the timing is failing due to setup and hold violations certain paths that use the 160MHz clock, with the launch clock being reported as clk|ref_160_40|altpll_component|auto_generated|pll1|clk[0]~1 and the latch clock being reported as clk|ref_160_40|altpll_component|auto_generated|pll1|clk[0], and reporting a skew between the two of -0.846ns From my understanding the clk[0]~1 clock is a name created during synthesis, but what I don't understand is if it is really the same as the clk[0] clock, ie the same signal on the same global routing resource, or are they actually different clocks on different global networks? Or is the clk[0]~1 clock being deliberately skewed in the attempt to meet the timing constraints? I have constrained all the I/O and clocks in the design and derived the clock uncertainty, but I haven't put any constraints on the transfers between 160MHz and 40MHz clock domains. I think I ought to put some multipath constraints on transfers between the two clock domains, but I am not sure of the syntax required, I have tried the following but it only seemed to make the timing worse: set_multicycle_path 4 -from [get_clocks {*ref_160_40*pll|clk[1]*}] -to [get_clocks {*ref_160_40*pll|clk[0]*}] -end -setup set_multicycle_path 1 -from [get_clocks {*ref_160_40*pll|clk[1]*}] -to [get_clocks {*ref_160_40*pll|clk[0]*}] -end -hold set_multicycle_path 4 -from [get_clocks {*ref_160_40*pll|clk[0]*}] -to [get_clocks {*ref_160_40*pll|clk[1]*}] -end -setup set_multicycle_path 1 -from [get_clocks {*ref_160_40*pll|clk[0]*}] -to [get_clocks {*ref_160_40*pll|clk[1]*}] -end -hold Just about all the timing issues I have involve this clk[0]~1 signal but I'm struggling to know what it is and where it has come from, any so explanations are welcomed! Thanks, Tom