码迷,mamicode.com
首页 > 其他好文 > 详细

Glitch-free clock switch

时间:2015-05-22 00:14:49      阅读:1017      评论:0      收藏:0      [点我收藏+]

标签:

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.

Glitch-free clock switch

标签:

原文地址:http://www.cnblogs.com/mengdie/p/4521199.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!