Implementing the Controller. Outline  Implementing the Controller  With JK Flip-flops  Decoder + D flip-flops  One Flip-flop per State  Multiplexers.

Slides:



Advertisements
Similar presentations
CS1104 – Computer Organization
Advertisements

Algorithmic State Machines SD192 Digital Systems Lecture notes July 16, 2004.
Assignments The submission has to be by the end of this week Write your full name and the group number on the answer sheet.
1ASM Algorithmic State Machines (ASM) part 1. ASM2 Algorithmic State Machine (ASM) ‏ Our design methodologies do not scale well to real-world problems.
Combinational Circuits
Appendix A Logic Circuits. Logic circuits Operate on binary variables that assume one of two distinct values, usually called 0 and 1 Implement functions.
Multiplexors Sequential Circuits and Finite State Machines Prof. Sin-Min Lee Department of Computer Science.
Nonlinear & Neural Networks LAB. CHAPTER 11 LATCHES AND FLIP-FLOPS 11.1Introduction 11.2Set-Reset Latch 11.3Gated D Latch 11.4Edge-Triggered D Flip-Flop.
Chapter 6 Digital System Design Digital Systems and Logic Designs.
Finite State Machine Chapter 10 RTL Hardware Design by P. Chu.
Sequential Design Part II. Output A(t+1) =D A = AX + BX B(t+1) =D B = AX Y = AX + BX.
ECE 331 – Digital System Design Introduction to and Analysis of Sequential Logic Circuits (Lecture #20) The slides included herein were taken from the.
The Control Unit: Sequencing the Processor Control Unit: –provides control signals that activate the various microoperations in the datapath the select.
1 COMP541 Sequencing and Control Montek Singh Mar 29, 2007.
1 Digital Logic
Chapter 8 -- Analysis and Synthesis of Synchronous Sequential Circuits.
Registers and Counters
Sequential circuit design
CHAPTER 3 Counters.  One of the common requirement in digital circuits/system is counting, both direction (forward and backward)  Digital clocks and.
A presentation on Counters
Chapter 1_4 Part II Counters
1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops.
Digital Computer Design Fundamental
Introduction to Digital Logic Design Appendix A of CO&A Dr. Farag
Chapter 5 - Part Sequential Circuit Design Design Procedure  Specification  Formulation - Obtain a state diagram or state table  State Assignment.
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 =
Chap 4. Sequential Circuits
Rabie A. Ramadan Lecture 3
Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.
CS1Q Computer Systems Lecture 8
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 21 Multiplier Example Example: (101 x 011) Base 2 Note that the partial product summation.
Chap 4. Sequential Circuits
ROM & PLA Digital Logic And Computer Design
Morgan Kaufmann Publishers
Chapter 8 -- Analysis and Synthesis of Synchronous Sequential Circuits.
Introduction to Sequential Logic Design Finite State-Machine Design.
M. Mateen Yaqoob The University of Lahore Spring 2014.
Digital Design Lectures 11 & 12 Shift Registers and Counters.
1 Registers & Counters Logic and Digital System Design - CS 303 Erkay Savaş Sabancı University.
9/15/09 - L24 Other FF TypesCopyright Joanne DeGroat, ECE, OSU1 Other FF Types.
Department of Computer and IT Engineering University of Kurdistan Computer Architecture (Review of Digital Design) By: Dr. Alireza Abdollahpouri.
Digital Logic Design.
1 State Reduction Goal: reduce the number of states while keeping the external input-output requirements unchanged. State reduction example: a: input 0.
1Sequential circuit design Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA by Erol Sahin and Ruken Cakici.
CEC 220 Digital Circuit Design Latches and Flip-Flops Monday, March 03 CEC 220 Digital Circuit Design Slide 1 of 19.
CS1Q Computer Systems Lecture 8
Chapter 8 -- Analysis and Synthesis of Synchronous Sequential Circuits.
Chapter 6 Digital System Design Digital Systems and Logic Designs.
ENG241 Digital Design Week #7 Sequential Circuits (Part B)
Synthesis Synchronous Sequential Circuits synthesis procedure –Word description of problem /hardest; art, not science/ –Derive state diagram & state table.
ASM Charts. Outline  ASM Charts Components of ASM Charts ASM Charts: An Example  Register Operations  Timing in ASM Charts  ASM Charts => Digital.
Chap 5. Registers and Counters
3.13 How many output lines will a five-input decoder have?
Processor Organization and Architecture Module III.
Contemporary Logic Design Prog. & Steering Logic © R.H. Katz Transparency No. 9-1 Chapter # 4: Programmable and Steering Logic Section 4.3, 4.4, 4.5, 4.6.
CSE260 Revision Final. MSI a) Implement the following function with 8:1 mux F(A,B,C,D) =∑(0,1,3,4,8,9,15) b) Construct AND, OR and NOT gates using 2:1.
Mu.com.lec 11.  Used not only to perform addition but also to perform subtraction, multiplication and division  The most basic of the adders is the.
Sequential Circuit Design 05 Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA.
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.
Design at the Register Transfer Level Algorithmic State Machines 07.
Partitioning of a digital system.
1 Lecture 3: Modeling Sequential Logic in Verilog HDL.
Prof. Sin-Min Lee Department of Computer Science
Basic Computer Organization and Design
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.
Digital Design Fundamentals
Table 8.1 Verilog 2001 HDL Operators
Sequential Digital Circuits
Chapter5: Synchronous Sequential Logic – Part 3
Digital Electronics and Logic Design
Presentation transcript:

Implementing the Controller

Outline  Implementing the Controller  With JK Flip-flops  Decoder + D flip-flops  One Flip-flop per State  Multiplexers  PLA/ROM

Outline  Implementing the Controller  With JK Flip-flops  Decoder + D flip-flops  One Flip-flop per State  Multiplexers  PLA/ROM

Implementing the Controller  Once the state table is obtained, the controller can be implemented using one of these techniques. 1. Traditional method: With JK flip-flops  design done at gate level.  suitable for small controllers.  procedure: prepare state table, use K-maps to obtain next- state/output functions. 2. Decoder + D flip-flops  suitable for moderately large controllers.  procedure: use decoder to obtain individual states; from the state table, obtain the next-state functions by inspection.

Implementing the Controller 3. Multiplexers  a more structured approach to implement controller.  suitable for moderately large controllers.  three level structure: first level consists of multiplexers that determine the next state of the register; second level is a register that holds the present state; third level has a decoder to provide separate output for each controller state.

Implementing the Controller 4. One flip-flop per state  also known as One-Hot Spot Method of ASM synthesis.  procedure: allocate one flip-flop per state; from state table, determine the formulae to set each flip-flop; must ensure that controller is properly initialized. 5. PLA/ROM  highly regular approach.  ROM approach uses a very simple table lookup technique but suffers from large number of don’t care states.  PLA can handle don’t care states well but design method is still at gate-level.

Outline  Implementing the Controller  With JK Flip-flops  Decoder + D flip-flops  One Flip-flop per State  Multiplexers  PLA/ROM

Implementing Controller: With JK Flip-flops  State table obtained from ASM chart:  Corresponding state table using JK flip-flops:

Outline  Implementing the Controller  With JK Flip-flops  Decoder + D flip-flops  One Flip-flop per State  Multiplexers  PLA/ROM

Implementing Controller: Decoder + D Flip-flops  The flip-flop input functions can be obtained directly from the state table by inspection.  This is because for the D flip-flops, the next state = flip-flop D input.  Decoder is then used to provide signals to represent different states. D Q D Q 2x4 decoder T0T0 T1T1 T2T2 unused G1G1 G0G0 ? ? clock

Implementing Controller: Decoder + D Flip-flops  Given the state table:  We can directly determine the inputs of the D flip-flops for G 1 and G 0. DG 1 = T 1.A 2.A 3 DG 0 = T 0.S + T 1

Implementing Controller: Decoder + D Flip-flops  Flip-flop input functions: DG 1 = T 1.A 2.A 3 DG 0 = T 0.S + T 1  Circuit: D Q D Q 2x4 decoder T0T0 T1T1 T2T2 unused G1G1 G0G0 clock A2A2 A3A3 S

Outline  Implementing the Controller  With JK Flip-flops  Decoder + D flip-flops  One Flip-flop per State  Multiplexers  PLA/ROM

Implementing Controller: One Flip-flop per State  Require n flip-flops for n states; each flip-flop represents one state. (Other methods: n flip-flops for up to 2 n states.) D Q D Q T1T1 T0T0 ? ? clock ::::

Implementing Controller: One Flip-flop per State  Formulae for next state can be obtained directly from state table: 1. If there is only one line going into the state, then formula = input condition ANDed with the previous state. 2. If there are more than one line, then formula = Ored of all the conditions found in (1).

Implementing Controller: One Flip-flop per State  State table:  State diagram: T0T0 S=0A 2 =0 T1T1 S=1 A 2 =1, A 3 =0 T2T2 A 2 =1, A 3 =1  Flip-flop input functions: DT 0 = T 2 + S'.T 0 DT 1 = S.T 0 + A 2 '.T 1 + A 2.A 3 '.T 1 = S.T 0 + (A 2.A 3 )'.T 1 DT 2 = A 2.A 3.T 1

Implementing Controller: One Flip-flop per State  Circuit diagram below. To initialize to state T 0, set flip-flop of T 0 to 1 and clear the rest to zero. DT 0 = T 2 + S'.T 0 DT 1 = S.T 0 + (A 2.A 3 )'.T 1 DT 2 = A 2.A 3.T 1 D Q T1T1 T0T0 S clock D Q D Q T2T2 A2A3A2A3 clear preset

Implementing Controller: One Flip-flop per State  Alternative: Use Q' output for T 0, and input function for T 0 is complemented. To initialize, clear all flip-flops to zero. DT 0 = (T 2 + S'.T 0 )' DT 1 = S.T 0 + (A 2.A 3 )'.T 1 DT 2 = A 2.A 3.T 1 D Q T1T1 T0T0 S clock D Q D Q T2T2 A2A3A2A3 clear Q'

Outline  Implementing the Controller  With JK Flip-flops  Decoder + D flip-flops  One Flip-flop per State  Multiplexers  PLA/ROM

Implementing Controller: Multiplexers  Purpose of multiplexer is to produce an input to its corresponding flip-flop equals to the value of the next state.  The inputs of multiplexers are determined from the decision boxes and state transitions in the ASM chart.

Implementing Controller: Multiplexers  Example 1: Given the state table.  Reformat the state table.

Implementing Controller: Multiplexers  Obtain multiplexer inputs:

Implementing Controller: Multiplexers  Draw the circuit: T1T1 T0T0 S clock D Q D Q T2T2 A2A3A2A3 2x4 decoder G1G1 G0G0 MUX S 1 S 0 MUX S 1 S Determine next state of register Hold present state

Implementing Controller: Multiplexers  Example 2: w 0 1 T0T0 00 T1T1 01 x 10 T3T3 11T2T2 10 y 10 y 01 z 10 z 01

Implementing Controller: Multiplexers T1T1 T0T0 w clock D Q D Q T3T3 yzyz 2x4 decoder G1G1 G0G0 MUX S 1 S 0 MUX S 1 S 0 y' y 0 x' 1 y z' T2T2

Outline  Implementing the Controller  With JK Flip-flops  Decoder + D flip-flops  One Flip-flop per State  Multiplexers  PLA/ROM

Implementing Controller: PLA/ROM  Similar to the design using D flip-flops and a decoder.  The only difference is PLA essentially replaces the decoder and all the gates in the inputs of the flip-flops. PLA/ROM External command Commands to architecture Present state Next state Register to represent states