Altera_Forum
Honored Contributor
13 years agoStratix III reconfigurable PLL switched clocks
Hello!
I'm having some strange troubles with a reconfigurable PLL. I have to write my settings to c2 to configure c1 and vice versa. The baseclock is 5.25MHz. The M multiplier is 199 (100 high count / 99 low count). 5.25*199= 1044.75MHz. Now I want c0 to be 104.475 MHz, c1 also 104.475 MHz (with 90° phase shift) and c2 double frequency 208.95 MHz. This translates in following high/low counts: - c0 5/5 (1044.75/10=104.475) - c1 5/5 (1044.75/10=104.475) - c2 3/2 (1044.75/5=208.95) If I write these settings to the PLL, my project don't work. With SignalTap, I discovered that the clocks c1 and c2 coming out of altpll_component are switched. c0 and c2 have the same frequency and c1 has the double frequency. After triple checking, the code, settings and stuff, I tried switching the settings: - c1 3/2 - c2 5/5 With this, my project does work! And SignalTap confirms that c0 and c1 have the same frequency and c2 has the double frequency. But I still don't know why I have to switch the settings? This can't be correct. Writing the settings to the altpll_reconfig is pretty straightforward. I can't imagine that I do something wrong there because otherwise the pll would be totally configured wrong I think. I also double checked that I use the right settings for writing to the pll (c1 is counter_type 0101, c2 is counter_type 0110). And because of the measurements I did with SignalTap, I can confirm that the clock signals coming out of the pll are already switched and it is not a switch further on in my code. Do I forget something? Do I miss something? Thanks in advance! JBC