Altera_Forum
Honored Contributor
9 years agoCyclone 5 PLLs part II
Part I of my question involved being able to re-configure PLLs from Linux and that part is now working great.
Part II - I'm trying to create a low jitter clock with a frequency range from 1000Hz to 40MHz off of the 50MHz reference clock provided by the board, I'm using an ATLAS / Soc dev board. Prior to attempting to use the on chip PLL I was using a simple DDS (counter) to perform this task but the jitter was terrible, with a variation of one 50MHz clock cycle as the counter rolled over to odd values in order to provide an average freq. My test frequency for jitter is 7MHz. I have no jitter at 8MHz, where the counters align at a nice divisor. Here's my problem / question. The PLL setup has the exact same jitter profile as a stand alone counter. I'm not getting any benefit from utilizing the PLL at all. It looks as though the PLL is just providing a counter / divider structure like the one I already had in place. I'm using some C++ code to develop the M, N, C values for the PLL config. The values I come up with are working with respect to correct frequency but as I said, jitter is bad. So... my question is two parts: 1) Is there a weighting I should place on choosing M, N, C? Should one be chosen first? Should some be larger than others? I'm looking for general rules. 2) I have not utilized the fractional portion of the PLL - not sure how to configure it? How do I take my calculations and derive a setting for the fractional value? Is it a MOD() function? Thanks for your help, Jon Herr -- snippet of calculation code: const int n_max = 65536, c_max = 65536, m_max = 65536; // FOUT = (FIN * M) / (N * C) for (n = 1; n < n_max; ++n) for (c = 1; c < c_max; ++c) for (m = 1; m < m_max; ++m) { //Fref = Fin / n; //Fvco = Fin * (m / n); dFout = (dFin * m) / (n * c); if (dFout == dBitRate) { std::cout << "n = " << n << " c = " << c << " m = " << m << std::endl; std::exit(0); } }