1ASM Algorithmic State Machines (ASM) part 1. ASM2 Algorithmic State Machine (ASM) ‏ Our design methodologies do not scale well to real-world problems.

Slides:



Advertisements
Similar presentations
Algorithmic State Machines SD192 Digital Systems Lecture notes July 16, 2004.
Advertisements

컴퓨터구조론 교수 채수환. 교재 Computer Systems Organization & Architecture John D. Carpinelli, 2001, Addison Wesley.
Register Transfer Level
Table 7.1 Verilog Operators.
Chapter 7 Henry Hexmoor Registers and RTL
Give qualifications of instructors: DAP
1 Register Transfer &  -operations Computer Organization Computer Architectures Lab REGISTER TRANSFER AND MICROOPERATIONS Register Transfer Language Register.
8085 processor. Bus system in microprocessor.
التصميم المنطقي Second Course
EKT 221 : Digital 2 ASM.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
Overview Datapath and Control Algorithmic State Machines (ASM)
Chapter 8 Sequencing and Control Henry Hexmoor1. 2 Datapath versus Control unit  Datapath - performs data transfer and processing operations  Control.
Design at the Register Transfer Level
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.
Chapter 7. Register Transfer and Computer Operations
4/10/20081 Lab 9 RT methodology introduction Register operations Data Path Control Path ASM Example TA: Jorge Crichigno.
FINITE STATE MACHINES (FSMs) Dr. Konstantinos Tatas.
Algorithmic State Machines
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 20 Datapath and Control Datapath - performs data transfer and processing operations.
ENGIN112 L26: Shift Registers November 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers.
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 8. Sequencing and Control. 8.1 Introduction Binary information in a digital computer –data manipulated in a datapath with ALUs, registers, multiplexers,
Chap 7. Register Transfers and Datapaths. 7.1 Datapaths and Operations Two types of modules of digital systems –Datapath perform data-processing operations.
REGISTER TRANSFER & MICROOPERATIONS By Sohaib. Digital System Overview  Each module is built from digital components  Registers  Decoders  Arithmetic.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
Register Transfer Level & Design with ASM
Abdullah Said Alkalbani University of Buraimi
EKT 221/4 DIGITAL ELECTRONICS II Chapter 2 SEQUENCING AND CONTROL.
Algorithmic state machines
Datapath - performs data transfer and processing operations The control unit sends: – Control signals – Control outputs The control unit receives: – External.
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
ASM Charts. Outline  ASM Charts Components of ASM Charts ASM Charts: An Example  Register Operations  Timing in ASM Charts  ASM Charts => Digital.
DIGITAL COMPONENTS. MULTIPLEXERS A multiplexer is a combinational circuit that receives binary information from one of 2 n input data lines and directs.
REGISTER TRANSFER & MICROOPERATIONS By Sohaib. Digital System Overview  Each module is built from digital components  Registers  Decoders  Arithmetic.
Counters and registers Eng.Maha Alqubali. Registers Registers are groups of flip-flops, where each flip- flop is capable of storing one bit of information.
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.
Design at the Register Transfer Level Algorithmic State Machines 07.
Digital Design: With an Introduction to the Verilog HDL, 5e M. Morris Mano Michael D. Ciletti Copyright ©2013 by Pearson Education, Inc. All rights reserved.
REGISTER TRANSFER AND MICROOPERATIONS
EKT 221 : DIGITAL 2.
Partitioning of a digital system.
CHAPTER 18 Circuits for Arithmetic Operations
REGISTER TRANSFER AND MICROOPERATIONS
Chap 7. Register Transfers and Datapaths
Figure 12-13: Synchronous Binary Counter
SLIDES FOR CHAPTER 12 REGISTERS AND COUNTERS
KU College of Engineering Elec 204: Digital Systems Design
DIGITAL 2 : EKT 221 RTL : Microoperations on a Single Register
Register Transfer and Microoperations
Digital Principles and Design Algorithmic State Machines
Digital System Design Review.
Instructor: Alexander Stoytchev
KU College of Engineering Elec 204: Digital Systems Design
Overview Datapath and Control Algorithmic State Machines (ASM)
ECE 434 Advanced Digital System L13
Iterative Versus Sequential Circuits
Table 8.1 Verilog 2001 HDL Operators
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Instructor: Alexander Stoytchev
Computer Architecture and Organization: L02: Logic design Review
REGISTER TRANSFER LEVEL (RTL) DESIGN Using ASM CHART
KU College of Engineering Elec 204: Digital Systems Design
Digital Logic Department of CNET Chapter-6
Digital Logic Department of CNET Chapter-6
CHAPTER 18 Circuits for Arithmetic Operations
Digital Circuits and Logic
Forward Design by state transition table, and state graph
Instruction execution and ALU
Presentation transcript:

1ASM Algorithmic State Machines (ASM) part 1

ASM2 Algorithmic State Machine (ASM) ‏ Our design methodologies do not scale well to real-world problems. Take this:

ASM3 Algorithmic State Machine (ASM) ‏ Procedure for implementing a problem with a given piece of equipment. Define digital algorithmic solutions for hardware. Resembles a conventional flow chart but interpreted differently: – ASM described the sequence as well as the timing of events. – Adapted to specify the control sequence and data processing operations.

ASM4 Control and datapath A digital system can be split into two components: Datapath unit: Manipulates data according to the system requirements. Control unit: Generates the signals for sequencing the operations in the data processor. Figure 8.2 Control and datapath interaction

ASM5 State box Figure 8.3 ASM chart state box

ASM6 Decision box Figure 8.4 ASM chart decision box

ASM7 Conditional box

ASM8 ASM block One entrance path Any number of exit paths Describes the state of the systems during one clock-pulse interval. The operations within the state and the conditional boxes are executed with a common clock pulse while the system is in state S_0.

ASM9 ASM chart – State diagram

ASM10 All the following operations occur simultaneously: – A  A+1 – If E == 1 then R  0 – Depending on E and F, the state is changed to S_1, S_2 or S_3. Timing

ASM11 Design problem Design a digital system with two flip-flops, E and F, and one 4-bit binary counter, A. The individual flip-flops of A are denoted by A4,A3,A2, and A1, with A4 holding the MSB. A start signal S initiates system operation by clearing the counter A and the flip-flop F. The counter is then incremented by 1 starting from the next clock pulse and continues to increment until the operations stop. Counter bits A3 and A4 determine the sequence of operations: – If A3 == 0, E is cleared to 0 and the count continues. – If A3 == 1, E is set to 1; then if A4 == 0, the count continues, but if A4 == 1, F is set to 1 on the next clock pulse and the system stops counting.

ASM12 Design a digital system with two flip-flops, E and F, and one 4-bit binary counter, A. The individual flip-flops of A are denoted by A4,A3,A2, and A1, with A4 holding the MSB. A start signal S initiates system operation by clearing the counter A and the flip-flop F. The counter is then incremented by 1 starting from the next clock pulse and continues to increment until the operations stop. Counter bits A3 and A4 determine the sequence of operations: – If A3 == 0, E is cleared to 0 and the count continues. – If A3 == 1, E is set to 1; then if A4 == 0, the count continues, but if A4 == 1, F is set to 1 on the next clock pulse and the system stops counting. ASM Chart

ASM13 Sequence of operations L1, L3 L2 L1L2L3

ASM14 Sequence of operations

ASM15 The datapath

ASM16 State diagram for control

ASM17 State table 10000XXX11T X10T X X0X XX100T XX000 T2T1T0G1G0A4A3SG1G0 Present state symbol OutputsNext state InputsPresent state

ASM18 State table 10000XXX11T X10T X X0X XX100T XX000 T2T1T0G0G1A4A3SG0G1 Present state symbol OutputsNext state InputsPresent state D G1 = T 1 A 3 A 4 D G0 = T 0 S + T 1 T 0 = G 0 ’ T 1 = G 1 ’ G 0 T 2 = G 1

ASM19

20ASM Algorithmic State Machines (ASM) part 2

ASM21 Binary multiplier How do we do multiplication by hand? In binary?

ASM22 Datapath for binary multiplier Sum only two binary numbers accumulating the partial sums in Register Q. Instead of shifting the multiplicand to the left, shift the product to the right

ASM23 P: the number of bits in the registers ASM for binary multiplier

ASM24 Initial state Register B Register ARegister QC P =1 Z =0

ASM25 Q0 = 1; add B – first partial product Register B Register ARegister QC P =1 Z =

ASM26 Shift right CAQ Register B Register ARegister QC P =1 Z =0

ASM27 Q0=1; add B – second partial product Register B Register ARegister QC P =1 Z =

ASM28 Shift right CAQ Register B Register ARegister QC P =1 Z =0

ASM29 Q0=0; Shift right CAQ Register B Register ARegister QC P =0=0 Z =0

ASM30 Q0=0; Shift right CAQ Register B Register ARegister QC P =0=0 Z =0

ASM31 Q0=1; add B – fifth partial product Register B Register ARegister QC P =1=1 Z =

ASM32 Shift right CAQ Register B Register ARegister QC P =1=1 Z =1

ASM33 Trace of the binary multiplication Final product in AQ = Shift right CAQ Fifth partial product Q0=1; add B Q0=0; shift right CAQ Q0=0; shift right CAQ Shift right CAQ Second partial product Q0=1; add B Shift right CAQ First partial product Q0 = 1; add B Multiplier in Q PQACInitial conditions : B=10111

ASM34 Control Logic Signals to be generated: – T0-T3 – L (The Load signal for Register A, that allows the loading of the output of the binary adder.

ASM35 Control Circuit implemented with D flip-flops + Dec

ASM36 Making the design of the control logic easier Z=0

ASM37 One FF per state T0 = T0 S’ + T3 Z T1 = T0 S T2 = T1 + T3 Z’ T3 = T2 Z=0

ASM38 ASM with four control inputs Operations are left blank. We are interested in the design of the control part only. Four control inputs: w, x, y, z Four states: T0-T3 needs 2 flip-flops.

ASM39 Using MUX’es to implement the control logic Two D flip- flops encode the state. The state is decoded into state signals T0-T3 by a decoder. The current state multiplexes the next state. Challenge: how to set the inputs of the MUX’es?

ASM40 Multiplexer inputs G2 y’z’1111 Y0111 y’z+y’z’ = y’ y+y’z’ = y+z’ y’z1011 yz1101 yz’0101 yzyz’+yz = y y’0001 x’1110 1x0110 w1000 w0w’0000 MUX2MUX1G1 Multiplexer inputs Input conditions Next State Present state

ASM41 The complete circuit

ASM42 Count-of-Ones The system consists of two registers R1 and R2 and a flip-flop E. The system counts the number of 1’s in the number loaded into R1 and set R2 to that number. Shift one bit from R1 into E. If E == 1 then R2++ If Z = = 1 (that is R1 == 0) then stop. R2 is initialized to all 1’s. Why?

ASM43 Datapath for Count-of-Ones

ASM44 Multiplexer inputs G2 E’1011 E E None1101 Z’ Z0010 S1000 S0S’0000 MUX2MUX1G1 Multiplexer inputs Input conditions Next State Present state

ASM45 Control logic for Count-of-Ones