Forum Discussion

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

Input Clock Multiplexer for PLL (CIII)

Hi,

I am have the following problem: I get three separate clock into my CIII FPGA (on dedicated clock inputs) and I need to choose one of the three and apply it to a PLL to frequency multiplication. Only one of the clocks are active at a time.

My initial idea was to pass the clocks through a multiplexer, then through a GCLK driver and then to the PLL, but according to the databook, an internal logic signal cannot be applied to the PLL input (although from the info in the databook I cannot see why not - the PLL can be driven from a ClkCtrl output and the ClkCtrl output can be driven from an internal logic signal, but, in any case, it does not work).

My second idea was to use the input multiplexer in the ClkCtrl block, thus avoiding user logic. Again, from the CIII databook (especially in figure 5-1, 5-2 and 5-4) thus seems possible. In all of these diagrams, a multipexer which seems capable of accepting up to 4 input pins, precede the PLL. Unfortunately, this seems to be misleading since the user guide for the AltClkCtrl megafunction, contains another image (Figure 1-1) which seems to indicate that the only user selectable inputs are two Clkp pins and two PLL outputs (although the figure is stated as being for the Stratix II).

There seems to be little clear information on how the CIII ClkCtrl input structure looks like and what the restrictions are.

Does anybody have any ideas on how I can implement such a clock multiplexer on a Cyclone III?

Regards,

Niki

9 Replies

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

    --- Quote Start ---

    Hi,

    I am have the following problem: I get three separate clock into my CIII FPGA (on dedicated clock inputs) and I need to choose one of the three and apply it to a PLL to frequency multiplication. Only one of the clocks are active at a time.

    My initial idea was to pass the clocks through a multiplexer, then through a GCLK driver and then to the PLL, but according to the databook, an internal logic signal cannot be applied to the PLL input (although from the info in the databook I cannot see why not - the PLL can be driven from a ClkCtrl output and the ClkCtrl output can be driven from an internal logic signal, but, in any case, it does not work).

    My second idea was to use the input multiplexer in the ClkCtrl block, thus avoiding user logic. Again, from the CIII databook (especially in figure 5-1, 5-2 and 5-4) thus seems possible. In all of these diagrams, a multipexer which seems capable of accepting up to 4 input pins, precede the PLL. Unfortunately, this seems to be misleading since the user guide for the AltClkCtrl megafunction, contains another image (Figure 1-1) which seems to indicate that the only user selectable inputs are two Clkp pins and two PLL outputs (although the figure is stated as being for the Stratix II).

    There seems to be little clear information on how the CIII ClkCtrl input structure looks like and what the restrictions are.

    Does anybody have any ideas on how I can implement such a clock multiplexer on a Cyclone III?

    Regards,

    Niki

    --- Quote End ---

    Hi,

    I have a small project attached. Have a look to it maybe it could help you. Unfortunately all inputs of the CLKCTRL block must be connected to a clock pin, therefore one clock needs to go out of the FPGA and back as input to a CLKCTRL block.

    Kind regards

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

    The only way I know of to mux 3 clocks at the input of a PLL in a Cyclone III without using any extra external connections as pletz has suggested is to use two PLLs. By passing one of the clocks through an extra PLL, you can then use the clock control block to switch between all 3 clocks. This method has some drawbacks such as wasting a PLL you may need for something else and increased jitter when using the clock that ends up going through two PLLs.

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

    Hi Kevin / Pletz,

    Thanks for the response! I also figured out the solution proposed by Kevin. To address the increased jitter problem of having two PLLs cascaded I tried to just mux the outputs of the two PLLs through a 2:1 mux in user logic and then drive it back onto a global clock. This seems to work, but I guess I use an extra Clock Control Block.

    Pity there are so many constraints on the use of the clock control blocks and the routing of clocks. But I guess it is tricky to make it more generic.

    Regards,

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

    Hi Pletz,

    I think the attachment contains some error. Can you please send it again. I am not able to open the project.

    regards,

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

    --- Quote Start ---

    Hi Pletz,

    I think the attachment contains some error. Can you please send it again. I am not able to open the project.

    regards,

    rajesh

    --- Quote End ---

    Hi Rajesh,

    I downloaded the zip file again and opened the project with Quartus 10.1 without any problem.

    kind regards

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

    Hi Pletz,

    Thank you very much for the response.

    I am using Quartus 9.0sp2. When I try to open the project, I get the following error:

    the project or revision contains one or more of the following illegal characters and cannot be opened: ^&?*|<>;'

    I don't see these characters in the name of the project. If possible, can you please save the project in an older version of Quartus, and then zip and upload it.

    Thanking you in advance,

    regards,

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

    --- Quote Start ---

    Hi Pletz,

    Thank you very much for the response.

    I am using Quartus 9.0sp2. When I try to open the project, I get the following error:

    the project or revision contains one or more of the following illegal characters and cannot be opened: ^&?*|<>;'

    I don't see these characters in the name of the project. If possible, can you please save the project in an older version of Quartus, and then zip and upload it.

    Thanking you in advance,

    regards,

    rajesh

    --- Quote End ---

    Hi Rajesh,

    I used now Quartus 9.1.

    Kind regards

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

    Hi Pletz,

    Sorry for disturbing you again. When I try to open the project in Quartus 9.0sp2, I get the warning of version incompatibility. After that I get the same error as I had previously mentioned. If you don't mind, can you please save that project in an older version.

    Actually I want to be able to perform clock division and multiplexing in Cyclone-I EP1C12 FPGA. Yesterday I had posted a thread with this issue:

    http://www.alteraforum.com/forum/showthread.php?t=28536

    Can you please respond to my query.

    regards,

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

    --- Quote Start ---

    Hi Pletz,

    Sorry for disturbing you again. When I try to open the project in Quartus 9.0sp2, I get the warning of version incompatibility. After that I get the same error as I had previously mentioned. If you don't mind, can you please save that project in an older version.

    Actually I want to be able to perform clock division and multiplexing in Cyclone-I EP1C12 FPGA. Yesterday I had posted a thread with this issue:

    http://www.alteraforum.com/forum/showthread.php?t=28536

    Can you please respond to my query.

    regards,

    rajesh

    --- Quote End ---

    Hi rajesh,

    the 9.1 version is my oldest version which I have installed. Please try the attached project archive.

    Kind regards

    GPK