11-0 Latches and Flip-Flops © 2010. Cengage Learning, Engineering. All Rights Reserved. 1-0 UNIT 11.

Slides:



Advertisements
Similar presentations
Flip-Flops and Related Devices
Advertisements

Chapter 10 馬可夫鏈 緒言 如果讀者仔細觀察日常生活中所發生的 諸多事件,必然會發現有些事件的未來 發展或演變與該事件現階段的狀況全然 無關,這種事件稱為獨立試行過程 (process of independent trials) ;而另一些 事件則會受到該事件現階段的狀況影響。
本章結構 前言 符號介紹與立透法則 指數機率分配 基本無限來源模式 基本有限來源模式 等候系統的經濟分析-最佳化 進階等候模式 16-1.
布林代數的應用--- 全及項(最小項)和全或項(最大項)展開式
第七章 抽樣與抽樣分配 蒐集統計資料最常見的方式是抽查。這 牽涉到兩個問題: 抽出的樣本是否具有代表性?是否能反應出母體的特徵?
: A-Sequence 星級 : ★★☆☆☆ 題組: Online-judge.uva.es PROBLEM SET Volume CIX 題號: Problem D : A-Sequence 解題者:薛祖淵 解題日期: 2006 年 2 月 21 日 題意:一開始先輸入一個.
:Word Morphing ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10508:word morphing 解題者:楊家豪 解題日期: 2006 年 5 月 21 日 題意: 第一行給你兩個正整數, 第一個代表下面會出現幾個字串,
Teacher : Ing-Jer Huang TA : Chien-Hung Chen 2015/6/2 Course Embedded Systems : Principles and Implementations Weekly Preview Question CH6.1~CH /12/05.
Section 1.2 Describing Distributions with Numbers 用數字描述分配.
Advanced Chemical Engineering Thermodynamics
Reference, primitive, call by XXX 必也正名乎 誌謝 : 部份文字取於前輩 TAHO 的文章.
指導教授:陳淑媛 學生:李宗叡 李卿輔.  利用下列三種方法 (Edge Detection 、 Local Binary Pattern 、 Structured Local Edge Pattern) 來判斷是否為場景變換,以方便使用者來 找出所要的片段。
Review of Chapter 3 - 已學過的 rules( 回顧 )- 朝陽科技大學 資訊管理系 李麗華 教授.
: OPENING DOORS ? 題組: Problem Set Archive with Online Judge 題號: 10606: OPENING DOORS 解題者:侯沛彣 解題日期: 2006 年 6 月 11 日 題意: - 某間學校有 N 個學生,每個學生都有自己的衣物櫃.
消費者物價指數反映生活成本。當消費者物價指數上升時,一般家庭需要花費更多的金錢才能維持相同的生活水準。經濟學家用物價膨脹(inflation)來描述一般物價持續上升的現象,而物價膨脹率(inflation rate)為物價水準的變動百分比。
STAT0_sampling Random Sampling  母體: Finite population & Infinity population  由一大小為 N 的有限母體中抽出一樣本數為 n 的樣 本,若每一樣本被抽出的機率是一樣的,這樣本稱 為隨機樣本 (random sample)
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 肆 資料分析與表達.
1. 假設以下的敘述為一未提供 “ 捷徑計算 ” 能力的程式段,試用程 式設計的技巧,使此敘述經此改 寫的動作後,具有與 “ 捷徑計算 ” 之 處理方法相同之處理模式。 if and then E1 else E2 endif.
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 肆 資料分析與表達.
第 3 章 資料和程式表示法.
Department of Air-conditioning and Refrigeration Engineering/ National Taipei University of Technology 模糊控制設計使用 MATLAB 李達生.
Monte Carlo Simulation Part.2 Metropolis Algorithm Dept. Phys. Tunghai Univ. Numerical Methods C. T. Shih.
Chapter 13 塑模靜態觀點:物件圖 Static View : Object Diagram.
Introduction to Java Programming Lecture 17 Abstract Classes & Interfaces.
第 5 章 深入 Response 物件 製作. 網頁的轉向與強制輸出 - 讓網頁轉彎的 Redirect 敘述 運用 Response 物件的 Redirect 方法,將瀏覽器顯 示的網頁,導向至其他網頁,語法如下: Response.Redirect 網頁路徑與名稱 此網頁路徑與名稱  若是導向到同一台.
:Problem D: Bit-wise Sequence ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 10232: Problem D: Bit-wise Sequence 解題者:李濟宇 解題日期: 2006 年 4 月 16.
: The largest Clique ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11324: The largest Clique 解題者:李重儀 解題日期: 2008 年 11 月 24 日 題意: 簡單來說,給你一個 directed.
Chapter 20 塑模動態觀點:狀態圖 Statechart Diagram. 學習目標  說明狀態圖的目的  定義狀態圖的基本記號  展示狀態圖的建構  定義活動、內部事件及遞延事件的狀態 圖記號.
: Happy Number ★ ? 題組: Problem Set Archive with Online Judge 題號: 10591: Happy Number 解題者:陳瀅文 解題日期: 2006 年 6 月 6 日 題意:判斷一個正整數 N 是否為 Happy Number.
: Fast and Easy Data Compressor ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10043: Fast and Easy Data Compressor 解題者:葉貫中 解題日期: 2007 年 3.
: Problem A : MiniMice ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11411: Problem A : MiniMice 解題者:李重儀 解題日期: 2008 年 9 月 3 日 題意:簡單的說,題目中每一隻老鼠有一個編號.
: Ahoy, Pirates! ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11402: Ahoy, Pirates! 解題者:李重儀 解題日期: 2008 年 8 月 26 日 題意:有一個海盜島有 N 個海盜,他們的編號 (id)
: Multisets and Sequences ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11023: Multisets and Sequences 解題者:葉貫中 解題日期: 2007 年 4 月 24 日 題意:在這個題目中,我們要定義.
:Nuts for nuts..Nuts for nuts.. ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 10944:Nuts for nuts.. 解題者:楊家豪 解題日期: 2006 年 2 月 題意: 給定兩個正整數 x,y.
資料結構實習-一 參數傳遞.
1 Introduction to Java Programming Lecture 2: Basics of Java Programming Spring 2008.
: Problem G e-Coins ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 10306: Problem G e-Coins 解題者:陳瀅文 解題日期: 2006 年 5 月 2 日 題意:給定一個正整數 S (0
: Beautiful Numbers ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11472: Beautiful Numbers 解題者:邱經達 解題日期: 2011 年 5 月 5 日 題意: 若一個 N 進位的數用到該.
Section 4.2 Probability Models 機率模式. 由實驗看機率 實驗前先列出所有可能的實驗結果。 – 擲銅板:正面或反面。 – 擲骰子: 1~6 點。 – 擲骰子兩顆: (1,1),(1,2),(1,3),… 等 36 種。 決定每一個可能的實驗結果發生機率。 – 實驗後所有的實驗結果整理得到。
Teacher : Ing-Jer Huang TA : Chien-Hung Chen 2015/6/25 Course Embedded Systems : Principles and Implementations Weekly Preview Question CH 2.4~CH 2.6 &
函式 Function Part.2 東海大學物理系‧資訊教育 施奇廷. 遞迴( Recursion ) 函式可以「呼叫自己」,這種動作稱為 「遞迴」 此程式的執行結果相當於陷入無窮迴圈, 無法停止(只能按 Ctrl-C ) 這給我們一個暗示:函式的遞迴呼叫可以 達到部分迴圈的效果.
演算法 8-1 最大數及最小數找法 8-2 排序 8-3 二元搜尋法.
845: Gas Station Numbers ★★★ 題組: Problem Set Archive with Online Judge 題號: 845: Gas Station Numbers. 解題者:張維珊 解題日期: 2006 年 2 月 題意: 將輸入的數字,經過重新排列組合或旋轉數字,得到比原先的數字大,
Structural Equation Modeling Chapter 6 CFA 根據每個因素有多重指標,以減少 測量誤差並可建立問卷的構念效度 驗證性因素分析.
Learning Method in Multilingual Speech Recognition Author : Hui Lin, Li Deng, Jasha Droppo Professor: 陳嘉平 Reporter: 許峰閤.
Chapter 10 m-way 搜尋樹與B-Tree
: Function Overloading ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11032:Function Overloading 解題者:許智祺 解題日期: 2007 年 5 月 8 日 題意:判對輸入之數字是否為.
Chapter 9 Counters 計數器 Asynchronous Counter Operation 非同步式計數器的運作
計算機概論 第6章 數位邏輯設計.
冷凍空調自動控制 - 系統性能分析 李達生. Focusing here … 概論 自動控制理論發展 自控系統設計實例 Laplace Transform 冷凍空調自動控制 控制系統範例 控制元件作動原理 控制系統除錯 自動控制理論 系統穩定度分析 系統性能分析 PID Controller 自動控制實務.
電腦的基本單位 類比訊號 (analog signal) 指的是連續的訊號
: Problem E Antimatter Ray Clearcutting ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11008: Problem E Antimatter Ray Clearcutting 解題者:林王智瑞.
連續隨機變數 連續變數:時間、分數、重量、……
Teacher : Ing-Jer Huang TA : Chien-Hung Chen 2015/6/30 Course Embedded Systems : Principles and Implementations Weekly Preview Question CH7.1~CH /12/26.
1 Introduction to Java Programming Lecture 3 Mathematical Operators Spring 2008.
數字系統與資料表示法 教師: 陳炯勳 數系轉換 r進制數字 稱為 base r或 radix r 有r個計數符號,計數順序逢r歸零(進位) A n A n - 1 ‥‥A 2 A 1 A 0 ﹒A -1 A -2 ‥‥A -m 其中A n 及A.
: Finding Paths in Grid ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11486: Finding Paths in Grid 解題者:李重儀 解題日期: 2008 年 10 月 14 日 題意:給一個 7 個 column.
:Problem E.Stone Game ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 10165: Problem E.Stone Game 解題者:李濟宇 解題日期: 2006 年 3 月 26 日 題意: Jack 與 Jim.
:Rings and Glue ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10301: Rings and Glue 解題者:施博修 解題日期: 2011 年 5 月 18 日 題意:小約翰有了個大麻煩,他不小心將 rings.
計 算 機 概 論 Chapter 10 作業系統. Ch010 作業系統 2 學習目標  描述作業系統的兩個主要任務  定義記憶體及程序管理  解釋邏輯位址與實體位址間的關係  基礎:第 5.2 節 范紐曼 電腦架構  ( 第 5 章講義第 頁 )
幼兒行為觀察與記錄 第八章 事件取樣法.
1 Introduction to Java Programming Lecture 3 Mathematical Operators Spring 2009.
CH 14-可靠度工程之數學基礎 探討重點 失效時間之機率分配 指數模式之可靠度工程.
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 肆 資料分析與表達.
1 資料表示法 Chien-Chang Chen Hsuan-Chuang University.
Registers(暫存器)與Counters(計數器):
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Pp 92 Parity Method Pp 94 The parity method.
1 Chap. 7 Response of First-Order RL and RC Circuits Contents 7.1 The Natural Response of an RL Circuit 7.2 The Natural Response of an RC Circuit 7.3 The.
CHAPTER 11 LATCHES AND FLIP-FLOPS This chapter in the book includes: Objectives Study Guide 11.1Introduction 11.2Set-Reset Latch 11.3Gated D Latch 11.4Edge-Triggered.
Presentation transcript:

11-0 Latches and Flip-Flops © Cengage Learning, Engineering. All Rights Reserved. 1-0 UNIT 11

11-1 Sequential logic circuits 1. A combinational circuit and a memory component 2. the output depends not only on the present input but also on the past sequence of inputs.

11-2 Figure 11.1 Feedback feedback means that the output is connected back into the input gate in the Circuit so as to form a closed loop. The output will continue to oscillate back and forth between 0 and 1.

11-3 Figure 11.2 Stable state

11-4 Memory devices in logic circuits 1. Latch( 閂鎖 ) 除非輸入信號送出來指示要切換狀態為止,該儲存元件可以 無限期地維持原先的狀態 SR latches D latches 2. Flip-Flop( 正反器 ) Edge-Triggered flip-flop ( 邊緣觸發型的記憶單元 ) Master slave flip-flop Edge-triggered flip-flop 3. RAM and ROM—A mass memory element

11-5 Figure 11.3 Set-Reset Latch (SR Latch) What is Latch? ( 閂 : stable state ) 1.We restrict the inputs so that R=S=1 is not allowed, so the outputs P and Q always complement: P=Q’ 2.An input S=1 sets the output to Q=1, and an input R=1 resets the output to Q=0

11-6 Figure 11.5 S-R Latch The circuit and the symbol of a S-R Latch Note that the symbol: Q directly above the S input

©2010 Cengage Learning Engineering. All Rights Reserved.11-7 Figure 11.6 Improper S-R Latch Operation Note that when S=R=1, the Latch will not operate properly When S and R are both 1, P and Q are both 0. Therefore P is not equal to Q’. This violate a basic rule of latch operation that requires the latch output to complement.

©2010 Cengage Learning Engineering. All Rights Reserved.11-8 SR Latch :由一對 NOR 閘所構成之 SR 閂鎖器,兩個互補輸出 分為兩種狀態 –S=1, R=0  set state (Q 會變成 1) –S=0, R=1  reset state (Q 會變成 0) –S=0, R=0  保持目前的值 The SR Latch

11-9 Figure 11.7 Timing Diagram for S-R Latch The timing diagram for S-R latch If the S or R input pulse is less than , the gate output will not change and the latch will Not change state.

11-10 Table 11.1 S-R Latch Next State and Output Present state and next state in a Latch Next state equation

11-11 Figure 11.8 Derivation of Q+ for an S-R Latch From the K-map When S=1, next state is 1 R=0, Q=1, next state is 1

11-12 Figure 11.9 Switch Debouncing with an S-R Latch Where the S-R latch will be used in logic circuit? 1.In asynchronous system( 非同步循序電路, ex: 儲存二進位資訊 ) 2.Debouncing switches.

11-13 Figure S-R Latch An alternative form of S-R latch uses NAND gates. SR latch with NOR gates SR latch with NAND gates

11-14 Figure Gated D Latch The gated D Latch 1.This type of latch is referred to as a transparent latch: because when G=1, the Q output is same as D input. Someone called this G input as a control line. Present state Input data Next state

11-15 Figure D Flip-Flops D Flip-Flop(FF) 1.D-Latch 和 D Flip-Flop 皆為僅有一輸入端 (D) 的雙穩態記憶電路 (Q,Q’) ,常用在資料儲存 與暫存器的使用。兩種元件都能將 D 之輸入端直接傳送到記憶體的輸出,但傳送的方式 不同 : a. FF: 由一個時序脈波 (Clock, Ck; a plus generator) 之邊緣輸入訊號 (edge- triggered signal) 來決定 D 輸出。 b. Latch: 當一個適當的邏輯準位加在致能端 (Enable input, G) ,則輸入之訊號變化 (D) 均會被傳送到輸出端。

©2010 Cengage Learning Engineering. All Rights Reserved Figure Timing for D Flip- Flop (Falling-Edge Trigger) D FF with Falling-Edge Trigger( 負緣觸發 ) 沒有被傳遞的訊號 : 不在觸發時發生變化

11-17 Figure D Flip-Flop (Rising-Edge Trigger) D FF with Rising-Edge Trigger( 正緣觸發 ) G2 觸發 (Q fow P) G1 不觸發 (D stored, P unchanged) G2 不 觸發 ( P stored, and Q unchanged) G1 觸發 (P fow D) G2 觸發 (Q fow P) G1 不觸發 (D stored, P unchanged) A rising-edge Triggered D-FF can be made by two gated D latches and one invertors

©2010 Cengage Learning Engineering. All Rights Reserved Figure Setup and Hold Times for an Edge-Trimmed D Flip-Flop A flip-flop changes state only on the active edge of the clock. To function properly, the rule are: 1.Before active edge, the D must stable for a setup time(t su ) 2.After active edge, the D must stable for a hold time(t h ) 3.The propagation delay(t p ) from the time the clock changed.

11-19 Figure Determination of Minimum Clock Period To determine the minimum clock period 1.Suppose the invertor have 2ns delay, and FF have 5ns delay. 2.Suppose the setup time is 3ns. Ck period 7ns Ck period 15ns Ck period 10ns

11-20 Figure S-R Flip-Flop SR Flip-Flop 1.Similar to an S-R Latch in that S=1 set Q output to 1; and R=1 resets the output to 0. The difference is that FF has a clock(Ck) input, the Q can change only after an active clock edge. 2. The truth table and next state equation(characteristic equation) is same as Latch.

11-21 Figure S-R Flip-Flop Implementation and Timing SR Flip-Flop The circuit can be made from two SR-latch and gates.(A master-slave FF) 1.When Ck is 0: S, R set the output of the Master, while the Slave hold the previous value of Q 2.When Ck from 0 to 1: P is held in the Master and this value is transferred to the Slave 3. When Ck from 1 to 0: The Q is latched in the slave and Master can process new inputs. Change inputs When Ck is low. 1. S=1 and R=0, P=1 2. When S change to 0 at t5, but P don’t change to 0. so Q change to 1 at t5. This is incorrect! (S=R=0, no change) Change input when Ck High To avoid this incorrect!!

11-22 Figure J-K Flip-Flop (Q Changes on the Rising Edge) J-K Flip-Flop 1. 與 SR FF 相似,主要差別在於, SR FF 在兩個輸入端皆為 1 時,會發生不確定之輸出, 而 J-K FF 的輸出狀態會反相,可以消除 SR FF 的不確定狀態。 2. 三個 inputs: Ck, J, K S RS R

11-23 Figure Master Slave J-K Flip-Flop (Q Changes on Rising Edge) J-K Flip-Flop circuit JK FF 一般以兩 SR Latch 和 gate 連結,以 master-slave 架構來實現 1. 與 SR FF 電路相似,差別僅在於把 input S,R 換成 J, K. 且 output 需 feedback 到 input gate. 2. S= JQ’Ck’ and R=KQCk’

11-24 Figure T Flip-Flop T Flip-Flop: 1. Also called a toggle FF, is frequently used in building counters. 2. Can be programmed in CPLDs and FPGA. 3. when T=0, no state change at Ck active edge when T=1, state change at Ck active edge

11-25 Figure Timing Diagram for T Flip-Flop (Falling Edge Trigger) The Timing diagram for a T-FF

11-26 Figure Implementation of T Flip-Flops Implement a T-FF circuit Connect the J,K inputs. J-K FF D FF

11-27 Figure D Flip-Flop with Clear and Preset Filp-Flop with Additional Inputs 1.Can be used to set the FF to an initial state independent of the clock. 2.ClrN: Clear Notation 3.PreN: Present Notation Note the inverter, so ClrN and PreN is active-low( 低準位觸發反應 ) 1. 當 PreN, ClrN 皆為 0 ,不允許 2. 當 PreN 為 0, 不管其他如何, output 強制設置為 1 3. 當 ClrN 為 0, 不管其他如何, output 強制歸為 當 PreN 和 ClrN 皆為 1, 依循 D-FF 原本 之操作 : 在 Ck 產生邊緣觸發時,傳送 D 至 output.

11-28 Figure Timing Diagram for D Flip-Flop with Asynchronous Clear and Preset The timming Diagram for a D-FF with ClrN and PreN 由於 ClrN =0 強制 Q 為 0 ( 雖然在 Ck rising-edge) 過程中 ClrN 回到 1 兩者皆為 1 ,因此回到原本操作 在下一個 Ck rising edge 觸發點, 看 D 輸出 D 此時變 0 由於 PreN =0 強制 Q 為 1 過程中 PreN 回到 1 兩者皆為 1 ,因此回到原本操作 在下一個 Ck rising edge 觸發點, 看 D 輸出

11-29 Figure D Flip-Flop with Clock Enable Common Clock 1.In a synchronous digital system( 同步數位系統 ), the FFs are usually driven by a common clock. 2. 以下兩種方式可以實現這樣電路 : a. Gating the clock: 存在一個潛在問題,當並接多個 FFs 的同步電路,因為 gate delay 的問題,導致實際傳達到每個 FF 的時間不同步。 b. D clock-enable( D-CE): 可以解決上述的 gate delay 問題,且這樣的電路常使用在 CPLDs 和 FPGA 電路設計中。當 CE=0, Ck 變成 disabled, output 維持不變 ; 當 CE=1, 元件操作為一個典型的 D-FF, Q=D. 所以 characteristic equation : 可以由一 MUX 來實現

11-30 Summary 1.SR latch and SR-FF 2.Gated D latch and D-FF 3.D-CE FF 4.JK-FF 5.T-FF Note that JK-FF and D-FF can convert to a T-FF The next-state (characteristic)equations:

11-31 循序電路的設計法 狀態圖 ( 以二進制計數器為例 ) 狀態表 輸入表

11-32 K-map 邏輯電路

©2010 Cengage Learning Engineering. All Rights Reserved Ch11 HW