Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20688 Discussions

pll reconfiguration and CP/LF parameters

Altera_Forum
Honored Contributor II
1,197 Views

Documentation describing the pll scan chain is clear enough for the settings of the m,n,cx counters. However, it is not clear to me how the charge-pump and loop-filter parameters should be calculated. 

 

Any help would be welcome. 

 

Thanks, 

P9 

 

PS. I'm using Stratix-2&3.
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
440 Views

I have never found any documentation from Altera which describes how these parameters should be calculated. 

 

If you have a finite number of PLL configurations you want to support, one way to determine these paramaters is to simply put your requirements into the PLL Mega Wizard for each case and see what values it uses for each of the settings.
0 Kudos
Altera_Forum
Honored Contributor II
440 Views

That's how I proceeded until now. 

 

I recently got a request to generate freqs with a certain offset with respect to the base freq. 

 

Even though the mega wizard is still a (heavy) option, it is not very flexible and seems to generate frequencies not as optimal as if I find the m, n, cx parameters myself. 

 

Altera's documentation (eg. AN367) states that "You can also change the charge pump and loop filter components, which dynamically affects the PLL bandwidth". OK, but without clear indication on how to set the CP/LF params,  

this statement is useless. 

 

In Altera's docs, there are formulas to compute the phase shifts. Having formulas to compute the PLL bandwidth would be very helpful tough, as deriving them from the PLL filter diagram is not a doable task (for me).
0 Kudos
Altera_Forum
Honored Contributor II
440 Views

Hi, 

 

I've been trough this mess too! And this is the reply i got from my gold membership FAE guy: "the lab people at altera say the megawizard uses a complicated set of tables to determine the right C and I for each set of input and output frequencies and VCO speed". unfortunately they didn't want to share these tables. I wrote a batch compilation script to compile and readback all scenarios i needed. A very boring task, but still better then doing 400 megawizard loops by hand!
0 Kudos
Altera_Forum
Honored Contributor II
440 Views

Hi Johannes, 

 

I can imagine that the tables may be complicated if you have to support all possible configuration scenarios of the PLLs (multi-freq, dephasing, chaining, etc...), but I don't believe this is true in the case of a single frequency generation. All examples read so far in the doc do anyways stick to such simple scenarios when it comes to use the reconfiguration component. A small effort from Altera to extract the meaningful part of the table (or write down the needed formula) would allow the user to use the reconfiguration component as a standalone component. This is not the case today, the megawizard is still needed for 2 undescribed parameters. I'll have again to hardcode all (fixed) values and limit the freedom to generate any wished frequency. 

 

Thanks all for your replies! 

P9
0 Kudos
Altera_Forum
Honored Contributor II
440 Views

Hi I'm developing a pulse generator and I use the pll to generate the timebase, so I need to reconfigure it "dynamically". 

jvov could share your script? maybe we could derive the formula through these data provided by megafunction... or meanwhile someone has found the CP/LF formula? 

 

thanks a lot! 

 

Alessandro Ruggeri
0 Kudos
Altera_Forum
Honored Contributor II
440 Views

hi, anybody found any way to solve this problem? I am trying to dynamically change my frequencies and i am having no luck with it!

0 Kudos
Altera_Forum
Honored Contributor II
440 Views

unfortunately not. :-( 

 

the way followed so far is to hardcode the mif content produced by the megawizard into my code. 

 

this way of working is OK only if you know which frequencies you need.
0 Kudos
Reply