© 2003-2008 BYU 13 COUNTERS Page 1 ECEn 224 COUNTERS Counters Transition Tables Moore Outputs Counter Timing.

Slides:



Advertisements
Similar presentations
General Sequential Design
Advertisements

COUNTERS Counters with Inputs Kinds of Counters Asynchronous vs
State-machine structure (Mealy)
State Machine Design Procedure
Review for Exam 2 Using MUXs to implement logic
COE 202: Digital Logic Design Sequential Circuits Part 3
A. Abhari CPS2131 Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and.
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Sequential Logic Computer Organization Ellen Walker Hiram College Figures from Computer Organization and Design 3ed, D.A. Patterson & J.L. Hennessey, Morgan.
Circuits require memory to store intermediate data
CS 151 Digital Systems Design Lecture 25 State Reduction and Assignment.
1 Sequential logic networks I. Motivation & Examples  Output depends on current input and past history of inputs.  “State” embodies all the information.
Sequential Logic Design
Sequential Circuits and Finite State Machines Prof. Sin-Min Lee
Contemporary Logic Design Sequential Case Studies © R.H. Katz Transparency No Chapter #7: Sequential Logic Case Studies 7.1, 7.2 Counters.
Give qualifications of instructors: DAP
Sequential Logic Design
CSCE 211: Digital Logic Design
Contemporary Logic Design Finite State Machine Design © R.H. Katz Transparency No Chapter #8: Finite State Machine Design Finite State.
Overview Sequential Circuit Design Specification Formulation
ECE 301 – Digital Electronics Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #17)
ECE 331 – Digital Systems Design Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #19)
ECE C03 Lecture 91 Lecture 9 Registers, Counters and Shifters Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Asynchronous and Synchronous Counters
1 Lecture 15 Registers Counters Finite State Machine (FSM) design.
Chapter 1_4 Part II Counters
Circuit, State Diagram, State Table
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Chap 4. Sequential Circuits
Chap 4. Sequential Circuits
Sequential Circuits. Two primary differences between combinational circuits and sequential circuits –Sequential circuits are synchronous (use a clock)
© BYU 18 ASYNCH Page 1 ECEn 224 Handling Asynchronous Inputs.
Introduction to Sequential Logic Design Finite State-Machine Design.
2017/4/24 CHAPTER 6 Counters Chapter 5 (Sections )
1 Lecture 22 Sequential Circuits Analysis. 2 Combinational vs. Sequential  Combinational Logic Circuit  Output is a function only of the present inputs.
 Counters are sequential circuits which "count" through a specific state sequence. They can count up, count down, or count through other fixed sequences.
Fall 2004EE 3563 Digital Systems Design EE3563 Chapter 7, 8, 10 Reading Assignments  7.1, 7.2, 7.3  8.1, ,   8.5.1, 8.5.2,
Synchronous Counters Synchronous digital counters have a common clock which results in all the flip-flops being triggered simultaneously. Consequently,
9/15/09 - L24 Other FF TypesCopyright Joanne DeGroat, ECE, OSU1 Other FF Types.
DLD Lecture 26 Finite State Machine Design Procedure.
Registers; State Machines Analysis Section 7-1 Section 5-4.
© BYU 11b MSFF Page 1 ECEn 224 MSFF Master/Slave Flip Flops.
Counters and Registers Synchronous Counters. 7-7 Synchronous Down and Up/Down Counters  In the previous lecture, we’ve learned how synchronous counters.
Learning to Design Counters
Counters Transition Tables Moore Outputs Counter Timing

Synchronous Sequential Logic Part I
ENG241 Digital Design Week #7 Sequential Circuits (Part B)
Synchronous Counter Design
Sequential Circuit Design 05 Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA.
Week #7 Sequential Circuits (Part B)
FIGURE 5.1 Block diagram of sequential circuit
CSCE 211: Digital Logic Design
Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and so on require.
Assistant Prof. Fareena Saqib Florida Institute of Technology
T Flip-Flop A T (toggle) flip-flop is a complementing flip-flop and can be obtained from a JK flip-flop when the two inputs are tied together. When T.
ECE Digital logic Lecture 16: Synchronous Sequential Logic
CSCE 211: Digital Logic Design
Registers and Counters
Digital Logic Design Sequential Circuits (Chapter 6)
CSCE 211: Digital Logic Design
CSCE 211: Digital Logic Design
Registers and Counters
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
DESIGN OF SEQUENTIAL CIRCUITS
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
CSCE 211: Digital Logic Design
Registers and Counters
Chapter5: Synchronous Sequential Logic – Part 3
COE 202: Digital Logic Design Sequential Circuits Part 3
Presentation transcript:

© BYU 13 COUNTERS Page 1 ECEn 224 COUNTERS Counters Transition Tables Moore Outputs Counter Timing

© BYU 13 COUNTERS Page 2 ECEn 224 General Sequential Systems D Q Current State State Memory Input Forming Logic Next State

© BYU 13 COUNTERS Page 3 ECEn 224 A Sequential Counter CLK Next State Current State The current state loads the next state values in response to the clock edge. IFL reacts after some gate delays to produce a new next state. Clock edges… D Q Current State State Memory +1 Next State 2 Master Slave

© BYU 13 COUNTERS Page 4 ECEn 224 Transition Table for 2-Bit Counter It is the truth table for the input forming logic… It describes what the next state values are as a function of the current state (clock is assumed)

© BYU 13 COUNTERS Page 5 ECEn 224 Implementation of 2-Bit Counter Q0 Q1 D Q CLK N1 N0 N0 = Q0’ N1 =Q1  Q0

© BYU 13 COUNTERS Page 6 ECEn 224 Example 2 – A Gray Code Counter N1= Q0 N0 = Q1’ Q1 D Q Q0 CLK N1 N0

© BYU 13 COUNTERS Page 7 ECEn 224 Example 3 – Not All Count Values Used Desired count sequence = 00 – 01 – … What should next state for 10 be?

© BYU 13 COUNTERS Page 8 ECEn 224 Example 3 – Not All Count Values Used Do the normal K-map minimization with don’t cares N1 = Q0Q1’N0 = Q0’

© BYU 13 COUNTERS Page 9 ECEn 224 Example 4 – A Ring Counter Desired count sequence = 001 – 010 – …

© BYU 13 COUNTERS Page 10 ECEn 224 Example 4 – A Ring Counter Desired count sequence = 001 – 010 – … Doing KMaps leads to: N2 = Q1 N1 = Q0 N0 = Q2 Q2Q2 Q1Q0Q1Q X 01X 11XX 101X Q2Q2 Q1Q0Q1Q X 011X 11XX 10X Q2Q2 Q1Q0Q1Q X1 01X 11XX 10X N2N1N0

© BYU 13 COUNTERS Page 11 ECEn 224 Example 4 – A Ring Counter D Q Q0 Q2 Q1 CLK

© BYU Initial State When a sequential circuit is powered on, we have no guarantee it will start in any particular state We must make sure our counters don’t start in an invalid state –They could remain stuck in invalid states! Most digital systems have a reset signal that is asserted after power up Designers must use flip flops with reset/set inputs as needed to achieve desired startup behavior 13 COUNTERS Page 12 ECEn 224

© BYU 13 COUNTERS Page 13 ECEn 224 A Ring Counter with Reset D Q SET D Q RST D Q RST Q0 Q2 Q1 CLK RESET Reset causes circuit to start in state “001”

© BYU 13 COUNTERS Page 14 ECEn 224 General Counter Design Procedure Write transition table for counter –Use X’s as appropriate Reduce each NX variable to a minimized equation Implement input forming logic (IFL) using gates Draw schematic using FF’s + IFL

© BYU 13 COUNTERS Page 15 ECEn 224 Counters With Alternative FF’s Current State Input Forming Logic T Inputs State Memory T Q

© BYU 13 COUNTERS Page 16 ECEn 224 Excitation Table for T Flip Flop Rearranging rows and/or columns… Tells how inputs affect outputTells what input is needed to achieve desired output transition In the end, they are the same table, just rearranged… Transition TableExcitation Table

© BYU 13 COUNTERS Page 17 ECEn 224 TFF Counter Design Using Augmented Transition Table Next state values Inputs to apply to achieve desired next state

© BYU 13 COUNTERS Page 18 ECEn 224 TFF Counter Design Using Augmented Transition Table Next state values Inputs to apply to achieve desired next state T2 = Q1Q0 T1 = Q0 T0 = ‘1’ Q2Q2 Q1Q0Q1Q T2

© BYU 13 COUNTERS Page 19 ECEn 224 TFF Counter Design ‘1’ CLK Q1 CLK T Q CLK Q2 Q0

© BYU 13 COUNTERS Page 20 ECEn 224 Excitation Table for JK Flip Flop Rearranging rows and/or columns… Tells how inputs affect output Tells what inputs to apply to achieve desired output transition Do you see why the X’s? In the end, they are the same table, just rearranged…

© BYU 13 COUNTERS Page 21 ECEn 224 JKFF Gray Code Counter Design Next state valuesInputs to apply to achieve desired next state

© BYU 13 COUNTERS Page 22 ECEn 224 JKFF Gray Code Counter Design Next state valuesInputs to apply to achieve desired next state J2 = Q1Q0’ K2 = Q1’ Q0’ J1 = Q2’ Q0 K1 = Q2 Q0 J0 = Q2 Q1 + Q2’ Q1’ = K0’ K0 = Q2’ Q1 + Q2 Q1’ = Q2  Q1

© BYU 13 COUNTERS Page 23 ECEn 224 General Counter Design Procedure Write transition table for counter –Use X’s as appropriate –If not DFF’s, augment table Reduce each FF input variable to a minimized equation Implement IFL with gates Draw schematic using FF’s + IFL

© BYU 13 COUNTERS Page 24 ECEn 224 Counters With Outputs Outputs D Q Current State Input Forming Logic Next State State Memory Output Forming Logic Outputs = f (CurrentState)

© BYU 13 COUNTERS Page 25 ECEn 224 Counters With Outputs Z=1 when count={0,3,6} Z is called a Moore or static output. It is a function only of the current state.

© BYU 13 COUNTERS Page 26 ECEn 224 Combined Transition Table Current stateNext stateOutput Z = Q2’ Q1’ Q0’ + Q2’ Q1 Q0 + Q2 Q1 Q0’ (implement OFL with gates)

© BYU 13 COUNTERS Page 27 ECEn 224 D Q Q2 Q1 Q0 N2 N1 N0 Z Counter With A Moore Output IFL OFL CLK

© BYU 13 COUNTERS Page 28 ECEn 224 Counter Timing Characteristics Q0 Q1 D Q CLK N1 N0 T ClockPeriod >= t CLK-Q + t IFL + t setup CLK Next State (N’s) Current State (Q’s) t CLK-Q t IFL t setup T ClockPeriod

© BYU 13 COUNTERS Page 29 ECEn 224 Counter Timing Example t CLK  Q = 1ns t IFL = 7ns t setup = 2ns Recall the following: –T = Clock period –f = Clock frequency or rate –T = 1/f –f = 1/T T >= 1ns + 7ns + 2ns = 10 ns (10 x s) f <= 1/T = 100 MHz (100 x 10 6 Hz)

© BYU 13 COUNTERS Page 30 ECEn 224 Output Timings CLK Z Current State t CLK  Q t OFL t CLK  Q t OFL Moore outputs appear t CLK  Q + t OFL after the clock edge.

© BYU 13 COUNTERS Page 31 ECEn 224 Counters and Timing The count sequence affects the size of IFL The size of the IFL affects t IFL t IFL affects T ClockPeriod Choosing binary counts is not always fastest or smallest

© BYU 13 COUNTERS Page 32 ECEn 224 Example Problem Design a 3-bit binary counter The Z output is TRUE iff count value is even The Y output is TRUE iff count value is multiple of 3