Adapted by Dr. Adel Ammar

Slides:



Advertisements
Similar presentations
ENGIN112 L23: Finite State Machine Design Procedure October 27, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 23 Finite State Machine.
Advertisements

Finite State Machines (FSMs)
State-machine structure (Mealy)
State Machine Design Procedure
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.
Computing Machinery Chapter 5: Sequential Circuits.
Circuits require memory to store intermediate data
CS 151 Digital Systems Design Lecture 21 Analyzing Sequential Circuits.
ECE 331 – Digital System Design
Give qualifications of instructors: DAP
Overview Sequential Circuit Design Specification Formulation
Digital Computer Design Fundamental
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Chap 4. Sequential Circuits
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Part 2 – Sequential.
Introduction to Sequential Logic Design Finite State-Machine Design.
1 Lecture #12 EGR 277 – Digital Logic Synchronous Logic Circuits versus Combinational Logic Circuits A) Combinational Logic Circuits Recall that there.
CPEN Digital System Design Chapter 5 - Sequential Circuits Sequential Circuit Design C. Gerousis © Logic and Computer Design Fundamentals, 4 rd Ed.,
1 Lecture 22 Sequential Circuits Analysis. 2 Combinational vs. Sequential  Combinational Logic Circuit  Output is a function only of the present inputs.
1 © 2014 B. Wilkinson Modification date: Dec Sequential Logic Circuits Previously, we described the basic building blocks of sequential circuits,
DLD Lecture 26 Finite State Machine Design Procedure.
ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham.
DESIGN OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham.
ENG241 Digital Design Week #7 Sequential Circuits (Part B)
A sequential logic circuit (a.k.a. state machine) consists of both combinational logic circuit(s) and memory devices (flip flops). The combinational circuits.
State Diagrams Tuesday, 12 September State diagram Graphical representation of a state table. –Provides the same information as a state table. –A.
Overview Part 1 - Storage Elements and Sequential Circuit Analysis
Week #7 Sequential Circuits (Part B)
Sequential Networks and Finite State Machines
4.
Sequential Circuit Design
ANALYSIS OF SEQUENTIAL CIRCUITS
EKT 221 : Digital 2 COUNTERS.
COMP541 Sequential Logic – 2: Finite State Machines
Number Systems Give qualifications of instructors:
Give qualifications of instructors: DAP
29th Oct Review Session 8.
Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and so on require.
Asynchronous Inputs of a Flip-Flop
ECE 301 – Digital Electronics
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.
FINITE STATE MACHINES (FSMs)
Registers and Counters Register : A Group of Flip-Flops. N-Bit Register has N flip-flops. Each flip-flop stores 1-Bit Information. So N-Bit Register Stores.
Sequential Networks and Finite State Machines
KU College of Engineering Elec 204: Digital Systems Design
Instructor: Alexander Stoytchev
Sequential circuit design
29-Nov-18 Counters Chapter 5 (Sections ).
Instructor: Alexander Stoytchev
Sequential circuit design
KU College of Engineering Elec 204: Digital Systems Design
ساختمان داده ها لیستهای پیوندی
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Instructor: Alexander Stoytchev
MTE 202, Summer 2016 Digital Circuits Dr.-Ing. Saleh Hussin
DESIGN OF SEQUENTIAL CIRCUITS
Sequential Circuit Analysis & Design
Chapter5: Synchronous Sequential Logic – Part 4
NAND and XOR Implementation
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
EGR 2131 Unit 12 Synchronous Sequential Circuits
Circuit Analysis Procedure by Dr. M
Dept of Electronics Engineering
Announcements Assignment 7 due now or tommorrow Assignment 8 posted
Chapter5: Synchronous Sequential Logic – Part 3
COE 202: Digital Logic Design Sequential Circuits Part 3
CS 151 Digital Systems Design Lecture 1 Course Overview
Presentation transcript:

Adapted by Dr. Adel Ammar Computer Organization Sequential Circuit Design Procedure Part 3: Counters and State Machines Adapted by Dr. Adel Ammar Give qualifications of instructors: DAP teaching computer architecture at Berkeley since 1977 Co-athor of textbook used in class Best known for being one of pioneers of RISC currently author of article on future of microprocessors in SciAm Sept 1995 RY took 152 as student, TAed 152,instructor in 152 undergrad and grad work at Berkeley joined NextGen to design fact 80x86 microprocessors one of architects of UltraSPARC fastest SPARC mper shipping this Fall

Overview From the problem specification Create a state diagram Convert the state diagram to a state table Determine inputs, states, and outputs variables of the circuit Convert next states and outputs to flip-flop input and output equations Create K-map for each output and flip-flop input as a function of inputs, and present states Determine minimized sum-of-product representation for each output variable Draw circuit diagram

Binary Counter 1 1-bit Binary Counter using D flip-flops State Diagram State Table + Excitation Table D = Q’(PS) Circuit 1 Q (PS) (NS) D 1 D Q Q’

4-bit binary up counter In synchronous counters, all FFs are triggered by the same input clock. A counter may operate without an external input (except for the clock pulses!)

2-bit Binary Counter 2-bit binary counter using D flip-flops with an Enable Input State Diagram 00 10 11 01 E=1 E=0

Binary Counter State Table E Q1 (PS) Q2 (NS) 1

Binary Counter State table + excitation tables E Q1 PS Q2 NS D1 D2 1

Binary Counter Karnaugh Maps D1 = E’Q1 + Q1Q2’ + EQ1’Q2 D2 = E’Q2 + EQ2’ D2 = E XOR Q2 Q1Q2 E 00 01 11 10 1 Q1Q2 E 00 01 11 10 1

Binary Counter D Q1 Q1’ D Q2 Q2’ E

Finite State Machine Specify the problem with words (e.g. Design a circuit that detects three consecutive 1 inputs) Assign binary values to states Develop a state table Use K-maps to simplify expressions Flip flop input equations and output equations Create appropriate logic diagram Should include combinational logic and flip flops

Example: Sequence Recognizer 1) verbal specifications: A sequence recognizer is to be designed to detect an input sequence of ‘1011’. The sequence recognizer outputs a ‘1’ on the detection of this input sequence. The sequential circuit is to be designed using JK and D type flip-flops. Sample Input/Output Trace

Example: Sequence Recognizer 2) State diagram: A state diagram consists of circles (which represent the states) and directed arcs that connect the circles and represent the transitions between states. In a state diagram: The number of circles is equal to the number of states. Every state is given a label (or a binary encoding) written inside the corresponding circle. The number of arcs leaving any circle is 2n where n is the number of inputs of the sequential circuit. The label of each arc has the notation x/y, where x is the input vector that causes the state transition, and y is the value of the output during that present state. An arc may leave a state and end up in the same or any other state.

Example: Sequence Recognizer 2) State diagram: Observations: We do not have an idea about how many states the machine will have. The states are used to “remember” something about the history of past inputs. For the sequence 1011, in order to be able to produce the output value 1 when the final 1 in the sequence is received, the circuit must be in a state that “remembers” that the previous three inputs were 101. There can be more than one possible state machine with the same behavior.

Example: Sequence Recognizer Deriving the state diagram: ‘S1’ represents a state when the last single bit of the sequence was one. ‘S2’ represents detection of ‘10’ as the last two bits of the sequence In state ‘S3’, we have detected input sequence ‘101’ state diagram

Example: Sequence Recognizer 3) Deriving the state table: A state table represents time sequence of inputs, outputs, and states in a tabular form. OR The states in the constructed state diagram have been assigned symbolic names rather than binary codes. It is necessary to replace these symbolic names with binary codes in order to proceed with the design. In general, if there are m states, then the codes must contain n bits, where 2n ≥ m, and each state must be assigned a unique code. There can be many possible assignments for our state machine.

Example: Sequence Recognizer State Table The binary code of the present state at a given time t represents the values stored in the flip-flops; and the next-state represents the values of the flip-flops one clock period later, at time t+1.

Example: Sequence Recognizer General Structure of Sequence Recognizer What remains to be determined is the combinational circuit which specifies the external outputs and the flip-flop inputs.

Example: Sequence Recognizer 4) Deriving the Excitation Table: The excitation table describes the behavior of the combinational portion of sequential circuit. we need to simplify the excitation table in a similar way we used to simplify truth tables for purely combinational circuits. Whereas in combinational circuits, our concern were only circuit outputs; in sequential circuits, the combinational circuitry is also feeding the flip-flops inputs. Thus, we need to simplify the excitation table for both outputs as well as flip-flops inputs.

Summary Flip flops contain state information State can be represented in several forms: State equations State table State diagram Possible to convert between these forms Circuits with states can take a finite set of values Finite state machines are the basis of many digital systems Design should start from clear specifications Develop state diagram and state table Optimize using combinational design techniques