CS M51A/EE M16 Winter’05 Section 1 Logic Design of Digital Systems Lecture 13 March 2 W’05 Yutao He yutao@cs.ucla.edu 4532B Boelter Hall http://courseweb.seas.ucla.edu/classView.php?term=05W&srs=187154200.

Slides:



Advertisements
Similar presentations
State-machine structure (Mealy)
Advertisements

ECE C03 Lecture 81 Lecture 8 Memory Elements and Clocking Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
CHAPTER 3 Sequential Logic/ Circuits.  Concept of Sequential Logic  Latch and Flip-flops (FFs)  Shift Registers and Application  Counters (Types,
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
CSCE 211: Digital Logic Design. Chapter 6: Analysis of Sequential Systems.
Circuits require memory to store intermediate data
EKT 124 / 3 DIGITAL ELEKTRONIC 1
ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 20 Sequential Circuits: Flip.
Sequential Circuits and Finite State Machines Prof. Sin-Min Lee
CS 151 Digital Systems Design Lecture 20 Sequential Circuits: Flip flops.
11/15/2004EE 42 fall 2004 lecture 321 Lecture #32 Registers, counters etc. Last lecture: –Digital circuits with feedback –Clocks –Flip-Flops This Lecture:
Sequential Circuits. 2 Sequential vs. Combinational Combinational Logic:  Output depends only on current input −TV channel selector (0-9) Sequential.
Contemporary Logic Design Sequential Logic © R.H. Katz Transparency No Chapter #6: Sequential Logic Design Sequential Switching Networks.
Sequential Circuits Chapter 4 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer,  S.
1 CSE370, Lecture 16 Lecture 19 u Logistics n HW5 is due today (full credit today, 20% off Monday 10:29am, Solutions up Monday 10:30am) n HW6 is due Wednesday.
Digital Computer Design Fundamental
COE 202: Digital Logic Design Sequential Circuits Part 1
ENGR-43_Lec-05c_Thevenin_AC_Power.pptx 1 Bruce Mayer, PE Engineering-43: Engineering Circuit Analysis Bruce Mayer, PE Licensed.
Chap 4. Sequential Circuits
1 CSE370, Lecture 17 Lecture 17 u Logistics n Lab 7 this week n HW6 is due Friday n Office Hours íMine: Friday 10:00-11:00 as usual íSara: Thursday 2:30-3:20.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Topic: Sequential Circuit Course: Logic Design Slide no. 1 Chapter #6: Sequential Logic Design.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
ECE C03 Lecture 81 Lecture 8 Memory Elements and Clocking Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Sahar Mosleh PageCalifornia State University San Marcos 1 More on Flip Flop State Table and State Diagram.
Digital Design: Sequential Logic Principles
Digital Design - Sequential Logic Design
LATCHES AND FLIP-FLOPS
Lecture #16: D Latch ; Flip-Flops
LATCHED, FLIP-FLOPS,AND TIMERS
Chapter #6: Sequential Logic Design
Instructor: Alexander Stoytchev
CSCE 211: Digital Logic Design
FIGURE 5.1 Block diagram of sequential circuit
CISE204: Design of Digital Systems Lecture 18 : Sequential Circuits
Asynchronous Inputs of a Flip-Flop
Assistant Prof. Fareena Saqib Florida Institute of Technology
Introduction to Sequential Logic Design
ECE Digital logic Lecture 16: Synchronous Sequential Logic
Sequential Circuits: Flip-Flops
CPE/EE 422/522 Advanced Logic Design L03
332:437 Lecture 12 Finite State Machine Design
Digital Logic Design Sequential Circuits (Chapter 6)
CPE/EE 422/522 Advanced Logic Design L02
LECTURE 15 – DIGITAL ELECTRONICS
CS Fall 2005 – Lec. #5 – Sequential Logic - 1
CSE 370 – Winter Sequential Logic-2 - 1
触发器 Flip-Flops 刘鹏 浙江大学信息与电子工程学院 March 27, 2018
ECE 434 Advanced Digital System L05
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
CSE 370 – Winter Sequential Logic - 1
Lecture 16 Logistics Last lecture Today HW5 out, due next wednesday
Instructor: Alexander Stoytchev
CS M51A/EE M16 Winter’05 Section 1 Logic Design of Digital Systems Lecture 12 February 28 W’05 Yutao He 4532B Boelter Hall
Instructor: Alexander Stoytchev
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Instructor: Alexander Stoytchev
Sequential Circuit Analysis & Design
Lecture 16 Logistics Last lecture Today HW5 out, due next wednesday
CS M51A/EE M16 Winter’05 Section 1 Logic Design of Digital Systems Lecture 16 March 14 W’05 Yutao He 4532B Boelter Hall
Instructor: Alexander Stoytchev
Synchronous sequential
Synchronous Sequential
Lecture 19 Logistics Last lecture Today
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Sequential Digital Circuits
Chapter5: Synchronous Sequential Logic – Part 3
CSE 370 – Winter Sequential Logic-2 - 1
Presentation transcript:

CS M51A/EE M16 Winter’05 Section 1 Logic Design of Digital Systems Lecture 13 March 2 W’05 Yutao He yutao@cs.ucla.edu 4532B Boelter Hall http://courseweb.seas.ucla.edu/classView.php?term=05W&srs=187154200

Outline Administrative Matters Basic sequential devices - Recap Design of sequential systems w/ FFs Analysis of sequential systems Timing Analysis Functional analysis

Administrative Matters Quiz #3 Given on Friday Closed-book/Closed-note You’ll be given FF Excitation Tables if they’re used Project #3 Is posted and due at 2pm March 11 (Friday), 2005 Midterm Solution Is posted

Latch and FF Loop feedback introduces “memory” capability D D Q CLK positive edge-triggered flip-flop D CLK QFF Qlatch D Q G CLK Level-sensitive gated latch behavior is the same unless input changes while the clock is high

Edged-Trigged Flip-Flops Development of D-FF Level-sensitive used in custom integrated circuits Edge-triggered used in programmable logic devices Good choice for data storage register Historically J-K FF was popular but now never used Similar to R-S but with 1-1 being used to toggle output Good in days of TTL/SSI (more complex input function): D = JQ' + K'Q Not a good choice for PALs/PLAs as it requires 2 inputs Can always be implemented using D-FF Asynchronous preset and clear inputs are highly desirable on FFs Used at start-up or to reset system to a known clean state

Excitation Functions of Flip-Flops SR Flip-Flop D Flip-Flop JK Flip-Flop T Flip-Flop

Write up Switching Expressions Roadmap of Implementation w/ FFs Start with State Table Select FF Types Fill in Truth Table of FF inputs Simplify with K-Map Write up Switching Expressions Draw Networks (FFs+Gates)

Ex. 8.8 - Modulo-5 Counter Use T flip-flops to design a modulo-5 counter

Ex. 8.8 - Modulo-5 Counter (Cont’d) State Assignment 5, 6, and 7 are don’t cares! State Transition Table

Ex. 8.8 - Modulo-5 Counter (Cont’d) Q CLK x y2 y1 y0 To Be Designed Truth Tables for T0,T1,T2

Ex. 8.8 - Modulo-5 Counter (Cont’d) K-Maps Switching Expressions

Ex. 8.8 - Modulo-5 Counter (Cont’d)

Example 8.9

Example 8.9 (Cont’d)

Example 8.9 (Cont’d)

Example 8.9 (Cont’d) 00 01 10 11

Example 8.9 (Cont’d)

State Assignment Revisit Basic goal: Encode each “symbolic” state with a binary number Basic fact: With n state bits for m states, there are 2n! / (2n – m)! Basic approaches of state assignment: One-FF-per-bit Binary code: just number states as they appear in the state table Other codes, etc. Gray Code Random: pick random codes One-FF-per-state (One-hot) State encoding with fewer bits has fewer equations However, each may be more complex State encoding with more bits has simpler equations

One-FF-Per-State(One-Hot) Approach Each flip-flop implements each state There is only single 1 in state encoding State functions are simple Design directly from the state diagram Determined by inputs

Example: Modulo-5 Counter Q Q’ S0 S1 S2 S3 S4 CLK

Compare M-5 Counter Implementations

Analysis of Sequential Systems Goal: Decide the timing and functional behavior from the implementation of a sequential system composed of FFs and logic gates Types: Timing analysis Functional analysis

Clock Revisit A regular periodic signal Period T Frequency f Time between two consecutive ticks Frequency f f = 1/T Duty-cycle d Time clock is high between ticks Usually expressed as % of period duty cycle (in this case, 50%) CLK period

Clock Signal Questions to ask: When inputs are sampled? Ideal Reality Level-sensitive Edge-triggered Questions to ask: When inputs are sampled? When the next state is computed? When outputs are asserted? (i.e. the value is 1)

Timing Parameters of A Basic Cell Setup time (tsu): minimum time before the clock triggering edge by which the input must be stable Hold time (th): minimum time after the clock triggering edge until which the input must remain stable Propagation delay (tp): time interval between input transition and output transition it causes CLK tsu th CLK D Q Input D Don’t care Don’t care tp Output Q Unknown

Timing Behavior of Sequential Network CLK Output input CLK All storage cells are controlled by the same clock edge The Com. Logic blocks: Inputs are updated at each clock tick All outputs MUST be stable before the next clock tick Network setup time, hold time, propagation delay Minimal clock cycle (maximal clock frequency) is a function of the critical path

Clock Skew

Dealing with Asyn. Inputs Clocked synchronous circuits Inputs, state, and outputs sampled or changed in relation to a common reference signal (called the clock) E.g., master/slave, edge-triggered Asynchronous circuits Inputs, state, and outputs sampled or changed independently of a common reference signal (hazards a major concern) E.g., gated latch Asynchronous inputs to synchronous circuits Inputs can change at any time, will not meet setup/hold times Dangerous, synchronous inputs are greatly preferred Cannot be avoided (e.g., reset signal, memory wait, user input)

Dealing with Asyn. Inputs Never allow asynchronous inputs to fan-out to more than one flip-flop Synchronize as soon as possible and then treat as synchronous signal D Q Q0 Clock Q1 Async Input Clocked Synchronous System D Q Q0 Clock Q1 Async Input Synchronizer

Functional Analysis Major goal: Basic approach: Basic steps: Obtain specification (high-level or binary level) of a sequential system from its implementation Basic approach: Break the loop at inputs of FFs Use characteristic equations of FFs Basic steps: Step 1. Obtain switching expressions of output and next state functions Step 2. Remove inputs of FFs from the expressions Step 3. Write transition table or draw state diagram Step 4. Select suitable encoding scheme and figure out high-level function

Characteristic Equation of FFs

Example 8.4 State Transition: Output:

State Transition Table Example 8.4 (Cont’d) State Transition Table Encoding Scheme Input Output State

High-Level Specification Example 8.4 (Cont’d) High-Level Specification

Time-behavior Specification Example 8.4 (Cont’d) State Diagram Time-behavior Specification

Example 8.7

Example 8.7 (Cont’d) JAKA, JBKB 10,01 01,01 10,10 01,10 00,00 01,00 11,10

Example 8.7 (Cont’d)

Example 8.7 (Cont’d)

About Design Bad designs Mediocre designs Good designs Creativity

Design Requirements Dependability Performance Cost

Performance Concern Criteria Goal How well it can perform? Short delay Low power dissipation Rich Functionalities Goal High-Performance

Cost Which part of cost you can control? List price Average Discount Average selling price Gross Margin Direct Cost Component Cost Which part of cost you can control? How to obtain a good design in a cost-effective way? Chip area number of gates number of inputs design time

Dependability Concern: What if Techniques: design is not perfect, or operational environments cause a fault in the system, or a malicious fault committed by human being? High Confidence Techniques: Fault -Avoidance: Testing, Verification Zero-defect is impossible for complex systems Fault-Tolerance: Design the system such that it will perform well as expected in spite of presence of faults Error detection/correction Codes One area of my research interests

Rules-of-thumb of a Good Design Divide-and-conquer Principle Partition a complex problem into a set of simple problems Start from a simple problem step-by-step Formulate a final solution by combining the solutions to all simple problems KISS Principle Keep It Simple, Stupid! The simplest solution is the correct one Keep it simple and make it work first

Rules-of-thumb of a Good Design (Cont’d) Murphy’s Law Things DO break at the last minute! Plan ahead, start earlier, and make continuous progress. Forrest Gump’s Law Never give up! It does not fail until you give up Working hard is never an excuse for failure

Summary Design of sequential systems with FFs State assignment one-FF-per-bit one-FF-per-state Implementation Use excitation function of FFs Analysis of sequential systems with FFs Timing analysis Functional analysis Use characteristic equations of FFs

Next Lecture Chapter 9