Glitch-free clock switch

1  Problem 

  With multi-frequency clocks being used in today’s devices, it is necessary to switch the source of a clock while the device is running.

  The two clock frequencies can be totally unrelated to each other or they can be multiples of each other.

  In either case, there is a chance of generating a glitch on the clock line at the time of the switch. A glitch on the clock line is hazardous to the whole system, as it could be interpreted as a capture clock edge by some registers while missed by others.

    

2  Solution

  1)  Related clock sources - source clocks are multiples of each other

  

    Registering select signal at negative-edge of the clock guarantees that no changes occur at the output while either of the clocks is at high level, thus protecting against chopping the output clock. Feedback from one clock‘s selection to the other enables the switch to wait for de-selection of the Current Clock before starting the propagation of the Next Clock, avoiding any glitches.

  2)  Unrelated clock sources

  

  Protection is provided against meta-stability by adding one extra stage of positive-edge flop for each of the clock sources. The positive-edge flop in each of the selection paths, along with the existing negative-edge flop, guards against potential meta-stability, which may be caused by asynchronous SELECT signal or asynchronous feedback from one clock domain to the other.

  A synchronizer is simply two stages of flip flops, where the first stage helps stabilize data by latching it and later passing it on to the next stage to be interpreted by rest of the circuit.

时间: 2024-11-13 19:48:43

Glitch-free clock switch的相关文章

PIC32MZ tutorial -- 32-bit Timer

The microcontroller is PIC32MZ2048ECH144 on the PIC32MZ EC Starter Kit. This microcontroller has four 32-bit synchronous timers are available by combining Timer2 with Timer3, Timer4 with Timer5, Timer6 with Timer7, and Timer8 with Timer9. The 32-bit

PIC32MZ tutorial -- OC Interrupt

In my previous blog "PIC32MZ tutorial -- Output Compare", I shows how to apply Output Compare without interrupt to generate PWM signal. I also tried the Output Compare interrupt. I selected OC to be PWM mode without fault pin (OCM = "110&qu

PIC32MZ tutorial -- Output Compare

Output Compare is a powerful feature of embedded world. The PIC32 Output Compare module compares the values stored in the OCxR and/or the OCxRS registers to the value in the selected timer. When a match occurs, the Output Compare module generates an

PIC32MZ tutorial -- External Interrupt

In my older blog "PIC32MZ tutorial -- Key Debounce", I shows how to acheive key debounce with port polling. At this moment, I write an application which uses External Interrupt.  Therefore, only generates interrupt and starts debounce when the f

PIC振荡器配置与时钟切换

单片机编程就是C语言+振荡器配置+寄存器设置. 以前对PIC振荡器的配置都是拿来主义,把别人的代码拿过来用就行了.这两天特意研究下振荡器的配置与时钟切换.在mplab IDE和C30编译器下,针对PIC24FJxx系列单片机完成的测试. 配置振荡器最主要的目的就是为了设置机械时钟Fosc,此时钟给CPU和外设提供时钟源.但为了降低功耗又不中断外设正常通信,此系列PIC保证CPU与外设的时钟同步情况下,增加了打盹模式,用于降低CPU运行时钟速度,以达到节能效果. 个人是这么理解的,CPU时钟就是代

P & R 9

Floorplan: 要做好floorplan需要掌握哪些知识跟技能? 明确Floorplan 处理的对象:对于数字设计的 Floorplan 来说,它是一个很依赖前后步骤的一个过程,这个可以看作是后端Layout 的开始,Floorplan 处理的对象我喜欢叫做Special Instance and Region,工具的进步已经可以从 RTL 级别,以及Synthesis 阶段去尝试做 Floorplan,而 Advanced Node,Physical Aware Synthesis 越来

操作系统的页面置换C++算法:OPT FIFO LRU CLOCK 计算缺页率

暴力直接上代码,主要是用了vector来实现,有些方法比较费时,不太好,请各位大神斧正.这是个人的作业,  这是代码下载页http://download.csdn.net/detail/l631068264/7644569   里面还有多级反馈队列进程调度的MFC版 #include <iostream> #include <algorithm> #include <vector> #include <stdio.h> #include <stdlib

Context Switch Definition

A context switch (also sometimes referred to as a process switch or a task switch) is the switching of the CPU (central processing unit) from one process or thread to another. A process (also sometimes referred to as a task) is an executing (i.e., ru

Method and apparatus for establishing IEEE 1588 clock synchronization across a network element comprising first and second cooperating smart interface converters wrapping the network element

Apparatus for making legacy network elements transparent to IEEE 1588 Precision Time Protocol operation. Network elements are wrapped by device(s) capable of providing either transparent clock or boundary clock operation. In one embodiment, smart int