Figure 1 shows a simple implementation of a clock switch, using an AND-OR type multiplexer logic.

Similar documents
Unit 9 Latches and Flip-Flops. Dept. of Electrical and Computer Eng., NCTU 1

A clock is a free-running signal with a cycle time. A clock may be either high or low, and alternates between the two states.

ECEN454 Digital Integrated Circuit Design. Sequential Circuits. Sequencing. Output depends on current inputs

Asynchronous (Ripple) Counters

Logic Design. Flip Flops, Registers and Counters

Clocks. Sequential Logic. A clock is a free-running signal with a cycle time.

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Sequential Circuits

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Sequential Circuits

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

ASYNCHRONOUS COUNTER CIRCUITS

CS3350B Computer Architecture Winter 2015

Counter dan Register

Sequential logic. Circuits with feedback. How to control feedback? Sequential circuits. Timing methodologies. Basic registers

cascading flip-flops for proper operation clock skew Hardware description languages and sequential logic

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

Flip-Flops. Because of this the state of the latch may keep changing in circuits with feedback as long as the clock pulse remains active.

Synchronous Sequential Logic

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

CHAPTER 11 LATCHES AND FLIP-FLOPS

Lecture 8: Sequential Logic

The basic logic gates are the inverter (or NOT gate), the AND gate, the OR gate and the exclusive-or gate (XOR). If you put an inverter in front of

CPE/EE 427, CPE 527 VLSI Design I Sequential Circuits. Sequencing

Software Engineering 2DA4. Slides 9: Asynchronous Sequential Circuits

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

Switching Circuits & Logic Design

EECS 373 Design of Microprocessor-Based Systems

Counters

2.6 Reset Design Strategy

Lecture 11: Sequential Circuit Design

Unit 11. Latches and Flip-Flops

1. What does the signal for a static-zero hazard look like?

Digital Fundamentals: A Systems Approach

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

D Latch (Transparent Latch)

6. Sequential Logic Flip-Flops

CS61C : Machine Structures

DEDICATED TO EMBEDDED SOLUTIONS

CS61C : Machine Structures

Clock Domain Crossing. Presented by Abramov B. 1

IT T35 Digital system desigm y - ii /s - iii

CSE 352 Laboratory Assignment 3

CprE 281: Digital Logic

Other Flip-Flops. Lecture 27 1

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

Clock - key to synchronous systems. Topic 7. Clocking Strategies in VLSI Systems. Latch vs Flip-Flop. Clock for timing synchronization

Clock - key to synchronous systems. Lecture 7. Clocking Strategies in VLSI Systems. Latch vs Flip-Flop. Clock for timing synchronization

Experiment 8 Introduction to Latches and Flip-Flops and registers

EECS150 - Digital Design Lecture 3 Synchronous Digital Systems Review. Announcements

Sequential Circuits. Sequential Logic. Circuits with Feedback. Simplest Circuits with Feedback. Memory with Cross-coupled Gates.

DIGITAL CIRCUIT LOGIC UNIT 11: SEQUENTIAL CIRCUITS (LATCHES AND FLIP-FLOPS)

6.S084 Tutorial Problems L05 Sequential Circuits

LATCHES & FLIP-FLOP. Chapter 7

Glitches/hazards and how to avoid them. What to do when the state machine doesn t fit!

Lec 24 Sequential Logic Revisited Sequential Circuit Design and Timing

The NOR latch is similar to the NAND latch

Sequencing. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall,

INTRODUCTION TO SEQUENTIAL CIRCUITS

Combinational vs Sequential

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Digital Design, Kyung Hee Univ. Chapter 5. Synchronous Sequential Logic

Engr354: Digital Logic Circuits

EEE2135 Digital Logic Design Chapter 6. Latches/Flip-Flops and Registers/Counters 서강대학교 전자공학과

Chapter 6. sequential logic design. This is the beginning of the second part of this course, sequential logic.

11. Sequential Elements

Chapter 1: Switching Algebra Chapter 2: Logical Levels, Timing & Delays. Introduction to latches Chapter 9: Binary Arithmetic

! Two inverters form a static memory cell " Will hold value as long as it has power applied

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

Sequential Logic. Sequential Circuits. ! Timing Methodologies " Cascading flip-flops for proper operation " Clock skew

RS flip-flop using NOR gate

Introduction to Microprocessor & Digital Logic

Memory elements. Topics. Memory element terminology. Variations in memory elements. Clock terminology. Memory element parameters. clock.

First Name Last Name November 10, 2009 CS-343 Exam 2

ESE 570 STATIC SEQUENTIAL CMOS LOGIC CELLS. Kenneth R. Laker, University of Pennsylvania, updated 25Mar15

UNIT 11 LATCHES AND FLIP-FLOPS

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

ENGN3213 Digital Systems and Microprocessors Sequential Circuits

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

CMSC 313 Preview Slides

3 Flip-Flops. The latch is a logic block that has 2 stable states (0) or (1). The RS latch can be forced to hold a 1 when the Set line is asserted.

Modeling Latches and Flip-flops

ECE 341. Lecture # 2

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Digital Fundamentals: A Systems Approach

Digital System Design

Review of digital electronics. Storage units Sequential circuits Counters Shifters

PRE J. Figure 25.1a J-K flip-flop with Asynchronous Preset and Clear inputs

DALHOUSIE UNIVERSITY Department of Electrical & Computer Engineering Digital Circuits - ECED 220. Experiment 4 - Latches and Flip-Flops


Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit)

ALGORITHMS IN HW EECS150 ALGORITHMS IN HW. COMBINATIONAL vs. SEQUENTIAL. Sequential Circuits ALGORITHMS IN HW

Fundamentals of Computer Systems

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

Multiplexor (aka MUX) An example, yet VERY useful circuit!

CS 110 Computer Architecture. Finite State Machines, Functional Units. Instructor: Sören Schwertfeger.

Outline. EECS150 - Digital Design Lecture 27 - Asynchronous Sequential Circuits. Cross-coupled NOR gates. Asynchronous State Transition Diagram

CHAPTER 1 LATCHES & FLIP-FLOPS

Transcription:

1. CLOCK MUXING: With more and more multi-frequency clocks being used in today's chips, especially in the communications field, it is often necessary to switch the source of a clock line while the chip is running. This is usually implemented by multiplexing two different frequency clock sources in hardware and controlling the multiplexer select line by internal logic. The two clock frequencies could be totally unrelated to each other or they may 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. In this article, two different methods of avoiding a glitch at the output clock line of a switch are presented. The first method is used when clocks are multiples of each other, while the second deals with clocks totally unrelated to each o ther. The problem with on-the-fly clock switching Figure 1 shows a simple implementation of a clock switch, using an AND-OR type multiplexer logic. The multiplexer has one control signal, named SELECT, which either propagates CLK0 to the output when set to "zero" or propagates CLK1 to the output when set to "one." A glitch may be caused due to immediate switching of the output from Current Clock source to the Next Clock source, when the SELECT value changes. Current Clock is the clock source currently selected while Next Clock is the clock source corresponding to the new SELECT value. The timing diagram in Figure 1 shows how a glitch is generated at the output, OUT CLOCK, when the SELECT control signal changes. The problem with this kind of switch is that the switch control signal can change any time with respect to the source clocks, thus creating a potential for chopping the output clock or creating a glitch at the output. The select control signal is most likely generated by a register driven by either of the two source clocks, which means that either it has a known timing relationship to both clocks, if both clocks are multiples of each other, or it may be asynchronous to at least one clock, if source clocks are not related in any way. Switching during either clock's high state needs to be avoided without having any idea about the frequencies or phase relationship of these clocks. Fixed delay can be used to induce the gap between the start and stop time of the two source clocks, but only if a fixed relationship exists between the two clock sources. It cannot be used where either the input frequencies are not known, or the clocks are not related.

Figure 1 -- Clock switching multiplexer Glitch protection for related clock sources A solution to prevent glitch at the output of a clock switch where source clocks are multiples of each other is presented in Fi gure 2. A negative edge triggered D flip-flop is inserted in the selection path for each of the clock sources. Registering the selection control at negative edge of the clock, along with enabling the selection only after other clock is de-selected first, provides excellent protection against glitches at the output. Registering the 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. The figure 2 timing diagram shows how the transition of the SELECT signal from 0 to 1 first stops propagation of CLK0 to the output at the proceeding falling edge of CLK0, then starts the propagation of CLK1 to the output at following negative edge of CLK1. There are three timing paths in this circuit that need special consideration the SELECT control signal to either one of the two negative edge triggered flip flops, the output of DFF0 to input of DFF1, and the output of DFF1 to the input of DFF0. If the signal on any of these three paths changes at the same time as the capturing edge of the destination flip flop's clock, there is a small chance that the output of that register may become meta-stable, meaning it may go to a state between an ideal "one" and an ideal "zero." A meta-stable state can be interpreted differently by the clock multiplexer and the enable feedback of the other flip flop. Therefore, it is required that capturing edges of both flip flops and the launch edge of the SELECT signal should

be set apart from each other to avoid any asynchronous interfacing. This can be easily accomplished by using proper multi-cycle hold constraints or minimum delay constraints, as the timing relationship is known between the two clocks. Figure2 -- Glitch-free clock switching for related clocks Fault tolerance At chip startup time, both flip flops DFF0 and DFF1 should be reset to the "zero" state so that neither one of the clocks is propagated initially. By starting both flip flops in "zero" state, fault tolerance is built into the clock switch. Let's say that one of the clocks was not toggling due to a fault at startup time. If the flip flop associated with the faulty clock had started up in "one" state, it would prevent the selection of other clock as the Next Clock, and its own state is

not changeable due to lack of a running clock. By starting both flip flops in "zero" state, even if one of the source clocks is not running, there is still the ability to propagate the other good clock to the output of the switch. Glitch protection for unrelated clock sources The previous method of avoiding a glitch at the output of a clock switch requires the two cl ock sources to be multiples of each other, such that user can avoid signals to be asynchronous with either one of the clock domains. There is no mechanism to handle asynchronous signals in that implementation. This leads to the second method of implementing the clock switch with synchronizer circuits to avoid potential metastability caused by asynchronous signals. The source of asynchronous behavior could either the be SELECT signal or the feedback from one clock domain to the other, when the two clock sources are totally unrelated to each other. As shown in Figure 3, protection is provided against meta-stability by adding one extra stage of positive edge triggered flip flop for each of the clock sources. The positive edge triggered flip flop in each of the selection paths, along with the existing negative edge triggered flip 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 synchroniz er 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.

Figure 3 -- Glitch-free clock switching for unrelated clocks Conclusion The hazard of generating a glitch on a clock line while switching between clock sources can be avoided with very little overhead by using the design techniques presented in this article. These techniques are fully scalable and can be extended to a clock switch for more than two clocks. For multiple clock sources, the select signal for each clock source will be enabled by feedback from all the other sources.