Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
17 years ago

Code for optimum PLL reconfig values

Hi,

running late in a project I have one quick question:

Does anyone have any pseudo code or c code for finding the PLL params for dynamic reconfiguration?

The downcounters are straight enough, but i have not found enough info for designing a program that also considers the VCO settings, Loop filter and so on.

Especially when using multiple clocks. I wrote this for a cypress pll a couple of years ago, but of course it uses a different scheme.

We happed mapped the Pll_reconfig to some registers in nios, and that works great.

Info anyone? I'll try niosforum too.

Regards,

Apus

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    Did you ever find the answers to your question? I am having same problem and i cant seem to figure out how to calculate the values. If you have any input on this matter please help me. I have been trying to reconfigure the pll for 2 weeks now!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    We gave up and used a programmable pll from cypress.

    As far as I remember we spent a fair amount of time on it before giving up.

    The reason is that the internal pll's does not follow a general pattern, they use lookup tables that are derived in lab settings and they are kept confidential by altera.

    (You migth get stable values within a certain area, but there is no way to check that at runtime)

    If you hear something else then I would be interested to know.

    Altera should absolutely make something like this available, would save time and valuable space.

    apus
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I agree with you altera should provide better documentation.

    I've spent 2 weeks trying to read the same document over and over again to see if i missed any important points. but still i am SOL.

    So far i have figured out how to calculate M, N and C and i understand that changing these values will give me the required fout using formula, fvc0 = (fin * M/N) and fout = (fin * M)/(n * C)

    but when i run these through PLL reconfig, my pll doesnt change.

    Weird thing is when the program first starts, due to unknown reason, my busy signal is always high!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    It's been a while since we looked at it so I am afraid that I cannot help you.

    The code is not in our version control system, since it did not work.

    apus