Parameterizable Macros for Intel® FPGAs User Guide

ID 772350
Date 7/08/2024
Public
Document Table of Contents

5.5. Glitchless Clock MUX Parameterizable Macro (ipm_cdc_glitchless_clk_mux)

The glitchless clock MUX parameterizable macro (ipm_cdc_glitchless_clk_mux) supports designs with multi-frequency clocks. Such design commonly require switching the clock source while the design is running. You can implement this clock switching by multiplexing two different frequency clock sources in hardware and controlling the multiplexer select line with internal logic. The two clock frequencies that you switch can be totally unrelated to each other, or they may be multiples of each other.

The glitchless clock mux macro allows you to avoid a glitch at the output of the clock line of a switch by specifying the relation of the input clocks with the CLK_TYPE parameter. Use the CLK_TYPE parameter to specify whether clocks are related (RELATED_CLKS) or unrelated (UNRELATED_CLKS).

If you parameterize the clock mux for related clocks, and feed it with clocks that are actually unrelated—the output may glitch.

Figure 11. Glitchless Clock Mux Parameterizable Macro Block Diagram


To ensure that the switchover occurs properly, the two clocks that feed the glitchless clock mux must be toggling before and after the select input changes. If the clocks stop toggling too soon, the switchover does not occur.

The switchover circuitry differs, depending on whether you parameterize the mux for related or unrelated clocks. Related clocks are multiples of one another. Based on the period of the clocks, there is a delay from the time the select input changes, until the changed clock is reflected at the output.

  • When you parameterize the clock mux for related clocks, and the select input changes—the delay is equal to the time to the next falling edge of the active clock, then the time to the next falling edge of the newly selected clock.
  • When you parameterize the clock mux for unrelated clocks, and the select input changes— the delay is equal to the time to the second falling edge of the active clock, then the time to the second falling edge of the newly selected clock.