Design at the Register Transfer Level Algorithmic State Machines 07.

Slides:



Advertisements
Similar presentations
Register Transfer Level
Advertisements

1ASM Algorithmic State Machines (ASM) part 1. ASM2 Algorithmic State Machine (ASM) ‏ Our design methodologies do not scale well to real-world problems.
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.
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.
Chapter 7 - Part 2 1 CPEN Digital System Design Chapter 7 – Registers and Register Transfers Part 2 – Counters, Register Cells, Buses, & Serial Operations.
FINITE STATE MACHINES (FSMs) Dr. Konstantinos Tatas.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts,
Logic and Computer Design Dr. Sanjay P. Ahuja, Ph.D. FIS Distinguished Professor of CIS ( ) School of Computing, UNF.
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.
Mantıksal Tasarım – BBM231 M. Önder Efe
Registers and Counters
1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops.
Implementing the Controller. Outline  Implementing the Controller  With JK Flip-flops  Decoder + D flip-flops  One Flip-flop per State  Multiplexers.
1 Registers and Counters A register consists of a group of flip-flops and gates that affect their transition. An n-bit register consists of n-bit flip-flops.
Rabie A. Ramadan Lecture 3
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,
EKT 221/4 DIGITAL ELECTRONICS II  Registers, Micro-operations and Implementations - Part3.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
2017/4/24 CHAPTER 6 Counters Chapter 5 (Sections )
Digital Design Lectures 11 & 12 Shift Registers and Counters.
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
Digital Logic Design.
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.
Register Transfer Languages (RTL)
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
Synchronous Counter Design
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.
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.
1 Registers A register is a group of n flip-flops each of them capable of storing one bit of information There are two types of registers: parallel and.
1 CHAPTER 12 REGISTERS AND COUNTERS This chapter in the book includes: Objectives Study Guide 12.1Registers and Register Transfers 12.2Shift Registers.
EKT 221 : DIGITAL 2.
Partitioning of a digital system.
Basic Computer Organization and Design
Chap 7. Register Transfers and Datapaths
KU College of Engineering Elec 204: Digital Systems Design
DIGITAL 2 : EKT 221 RTL : Microoperations on a Single Register
Instructor: Alexander Stoytchev
Digital Principles and Design Algorithmic State Machines
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
Registers and Register Transfers
Computer Architecture and Organization: L02: Logic design Review
Registers.
REGISTER TRANSFER LEVEL (RTL) DESIGN Using ASM CHART
KU College of Engineering Elec 204: Digital Systems Design
Registers and Counters
Forward Design by state transition table, and state graph
ECE 352 Digital System Fundamentals
Presentation transcript:

Design at the Register Transfer Level Algorithmic State Machines 07

Register Transfer Level (RTL) Spring' Logic Design / 07Page 2

Verilog … Spring' Logic Design / 07Page 3

232 - Logic Design / 074 Algorithmic State Machine (ASM)  Our design methodologies do not scale well to real-world problems.  … Spring'14

232 - Logic Design / 075 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 describes the sequence as well as the timing of events. ◦Adapted to specify the control sequence and data processing operations. Spring'14

232 - Logic Design / 076 Control and Datapath  A digital system can be split into two components:  Datapath: Manipulates data according to the system requirements.  Control (Unit/Logic): Generates the signals for sequencing the operations in the data processor. Spring'14

232 - Logic Design / 077 State Box Spring'14

232 - Logic Design / 078 Decision Box Spring'14

232 - Logic Design / 079 Conditional Box Spring'14

232 - Logic Design / 0710 ASM Block  One entrance path  Any number of exit paths  Describes the state of the system during one clock-pulse interval.  The operations within the state and the conditional boxes are all executed with a common clock pulse while the system is in state T 1. Spring'14

232 - Logic Design / 0711 ASM chart – State diagram Spring'14

232 - Logic Design / 0712  All the following operations occur simultaneously (in parallel):  A  A+1  If E == 1 then R  0  Depending on the values of E and F, the state is changed to T 2, T 3 or T 4. Spring'14 Timing

232 - Logic Design / 0713 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 A 4, A 3, A 2, and A 1 (where A 4 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 A 3 and A 4 determine the sequence of operations: ◦If A 3 == 0, E is cleared to 0 and the count continues. ◦If A 3 == 1, E is set to 1; then if A 4 == 0, the count continues, but if A 4 == 1, F is set to 1 on the next clock pulse and the system stops counting. Spring'14

232 - Logic Design / 0714 Control & Datapath Status Signals Spring'14

232 - Logic Design / 0715 ASM Chart  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 A 4,A 3,A 2, and A 1 (where A 4 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 A 3 and A 4 determine the sequence of operations: ◦If A 3 == 0, E is cleared to 0 and the count continues. ◦If A 3 == 1, E is set to 1; then ◦if A 4 == 0, the count continues, ◦but if A 4 == 1, F is set to 1 on the next clock pulse and the system stops counting. Spring'14

232 - Logic Design / 0716 Sequence of Operations CounterFlip-flopsConditionsState A4A3A2A1EF A3=0, A4=0 T1T A3=1, A4= A3=0, A4= T2T T0T0 L1, L3 L2 L1L2L3 Spring'14

232 - Logic Design / 0717 Sequence of Operations CounterFlip-flopsConditionsStat e A4A3A2A1EF A3=0, A4=0T1T A3=1, A4= A3=0, A4= T2T T0T0 Spring'14

Circuit Design  Datapath ◦ State Boxes ◦ Conditional Boxes  Control Logic ◦ Decision Boxes ◦ State Transitions Spring' Logic Design / 07Page 18

232 - Logic Design / 0719 The Datapath (3Ed) Spring'14

232 - Logic Design / 0720 The Datapath (4Ed) Spring'14

232 - Logic Design / 0721 State Diagram for Control Spring'14

232 - Logic Design / 0722 State Table Present state symbol Present state InputsNext state Outputs G1G1 G0G0 SA3A3 A4A4 G1G1 G0G0 T0T0 T1T1 T2T2 T0T0 000XX00100 T0T0 001XX01100 T1T1 01X0X01010 T1T1 01X T1T1 01X T2T2 11XXX00001 Spring'14

232 - Logic Design / 0723 State Table Present state symbol Present state InputsNext state Outputs G1G1 G0G0 SA3A3 A4A4 G1G1 G0G0 T0T0 T1T1 T2T2 T0T0 000XX00100 T0T0 001XX01100 T1T1 01X0X01010 T1T1 01X T1T1 01X T2T2 11XXX00001  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 Spring'14

232 - Logic Design / 0724 Control Logic Spring'14

232 - Logic Design / 0725 Control Logic Spring'14

232 - Logic Design / 0726 Homeworks please!  All homeworks are due the start of a class. Homeworks submitted after 15 minutes of a class are considered late. ◦ Homeworks submitted late are eligible for a maximum of 80% credit. ◦ Homeworks submitted after one week of their due date are worth at most 60% credit. ◦ Any homeworks not submitted within two weeks of its due date receive no credit.  Academic dishonesty policy: All works (homework, exam, lab preliminaries, etc.) submitted should be fully your own. We have a zero tolerance policy on cheating and plagiarism. Your work will be regularly checked for such misconduct and the following punishment policy will be applied: ◦ Cheating once in a homework will diminish the percentage of your Homework grades to 5%. A second cheating will remain you pointless from Homeworks and can open the way for legal persecution. ◦ If you suspect that someone has copied your homework partially or fully without your consent, tell it now! ◦ At all times you have the right to challenge our decisions on cheating, upon which the case will be processed through the disciplinary channels of the university. However, we would like to remind you that, if found guilty, the legal code of the university proposes a minimum of six month expelsion from the university. Spring'14

232 - Logic Design / 0727 Recall  What’s an ASM?  What are the components?  What’s the design procedure? Spring'14

232 - Logic Design / 0728 Binary Multiplier  How do we do multiplication by hand? In binary? 10111multiplicand 10011multiplier product Spring'14

232 - Logic Design / 0729 High-Level View Spring'14

232 - Logic Design / 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  Spring'14

232 - Logic Design / 0731  P: the number of bits in the registers ASM for Binary Multiplier Spring'14

232 - Logic Design / 0732 Initial State Register B Register ARegister Q C P =1 Z=0 Spring'14

232 - Logic Design / 0733 Q0 = 1; add B – first partial product Register B Register ARegister QC P =1 Z= Spring'

232 - Logic Design / 0734 Shift Right CAQ Register B Register ARegister QC P =1 Z=0 Spring'14

232 - Logic Design / 0735 Q0 = 1; add B – second partial product Register B Register ARegister QC P =1 Z= Spring'14

232 - Logic Design / 0736 Shift right CAQ Register B Register ARegister QC P =1 Z=0 Spring'14

232 - Logic Design / 0737 Q0 = 0; Shift right CAQ Register B Register ARegister QC P =0=0 Z=0 Spring'14

232 - Logic Design / 0738 Q0 = 0; Shift right CAQ Register B Register ARegister QC P =0=0 Z=0 Spring'14

232 - Logic Design / 0739 Q0 = 1; Add B – fifth partial product Register B Register ARegister QC P =1=1 Z= Spring'14

232 - Logic Design / 0740 Shift right CAQ Register B Register ARegister QC P =1 Z=1Z=1 Spring'14

232 - Logic Design / 0741 Trace of the Binary Multiplication Initial conditions : B=10111CAQP Multiplier in Q Q0 = 1; add B First partial product Shift right CAQ Q0=1; add B Second partial product Shift right CAQ Q0=0; shift right CAQ Q0=0; shift right CAQ Q0=1; add B Fifth partial product Shift right CAQ Final product in AQ = Spring'14

232 - Logic Design / 0742 Making the design of the control logic easier Z=0 Spring'14

232 - Logic Design / 0743 Control Logic  Signals to be generated:  T 0 -T 3  L (The Load signal for Register A, that allows the loading the sum into register A.  Spring'14

232 - Logic Design / 0744 Control Circuit implemented with D flip-flops + Decoder Spring'14

232 - Logic Design / 0745 One FF per state  T 0 = T 0 S’ + T 3 Z  T 1 = T 0 S  T 2 = T 1 + T 3 Z’  T 3 = T 2 Z=0 Spring'14

232 - Logic Design / 0746 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: T 0 -T 3 needs 2 flip-flops. Spring'14

232 - Logic Design / 0747 Using MUX’es to implement the control logic  Two D flip-flops encode the state.  The state is decoded into state signals T 0 -T 3 by a decoder.  The current state multiplexes the next state.  Challenge: how to set the inputs of the MUX’es? Spring'14

232 - Logic Design / 0748 Multiplexer Inputs Present state Next State Input conditions Multiplexer inputs G 1 G2G2 G1G1 G2G2 MUX1MUX2 0000w’0w 0001w 0110x1x’ y’yz’+yz = y yz 1010yz’ 1011yz 1101y’zy+y’z’ = y+z’ y’z+y’z’ = y’ 1110Y 1111y’z’ Spring'14

232 - Logic Design / 0749 The complete circuit Spring'14

232 - Logic Design / 0750 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? Spring'14

232 - Logic Design / 0751 Datapath for Count-of-Ones Spring'14

232 - Logic Design / 0752 Multiplexer Inputs Present state Next State Input conditions Multiplexer inputs G1G2G1G2MUX1MUX2 0000S’0S 0001S 0100ZZ’ None EE’E 1101 Spring'14

232 - Logic Design / 0753 Control Logic for Count-of-Ones Spring'14

232 - Logic Design / 07Page 54 End of RTL / ASM …

232 - Logic Design / 0755 How to implement the control logic with a PLA? G1G1 G2G …. State signals (T 1 -T n ) Output signals Inputs PLA …. Spring'14

232 - Logic Design / 0756Spring'14

232 - Logic Design / 0757Spring'14