1 ECE 545 – Introduction to VHDL Algorithmic State Machines Sorting Example ECE 656 Lecture 8.

Slides:



Advertisements
Similar presentations
Chapter #8: Finite State Machine Design 8
Advertisements

George Mason University ECE 448 – FPGA and ASIC Design with VHDL ECE 448 Lecture 12 Sorting Example.
1ASM Algorithmic State Machines (ASM) part 1. ASM2 Algorithmic State Machine (ASM) ‏ Our design methodologies do not scale well to real-world problems.
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
Give qualifications of instructors: DAP
EKT 221 : Digital 2 ASM.
Finite State Machine Chapter 10 RTL Hardware Design by P. Chu.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
3/20/20091 More State Machines. Multiple processes.
The Control Unit: Sequencing the Processor Control Unit: –provides control signals that activate the various microoperations in the datapath the select.
10/20/20081 Lab 6 – More State Machines. Multiple processes.
10/13/ Lab 6 - Algorithmic State Machines ECE238L 10/13/2009.
Algorithmic State Machine (ASM) Charts
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts,
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 20 Datapath and Control Datapath - performs data transfer and processing operations.
FINITE STATE MACHINES - II
Lecture 9 RTL Design Methodology Sorting Example.
Chap 8. Sequencing and Control. 8.1 Introduction Binary information in a digital computer –data manipulated in a datapath with ALUs, registers, multiplexers,
George Mason University ECE 545 – Introduction to VHDL ECE 545 Lecture 5 Finite State Machines.
CprE / ComS 583 Reconfigurable Computing
George Mason University Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts ECE 545 Lecture 14.
1 ECE 545—Digital System Design with VHDL Lecture 6 Behavioral VHDL Coding (for Synthesis): Finite State Machines and ASMs 9/30/08.
George Mason University Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code ECE 448 Lecture 6.
Lecture 9 RTL Design Methodology. Structure of a Typical Digital System Datapath (Execution Unit) Controller (Control Unit) Data Inputs Data Outputs Control.
Algorithmic state machines
Datapath - performs data transfer and processing operations The control unit sends: – Control signals – Control outputs The control unit receives: – External.
Digital System Design using VHDL
Algorithmic State Machines Sorting Signed & Unsigned Data Types
Hao Zheng Comp Sci & Eng USF CDA 4253 FPGA System Design Chapter 5 Finite State Machines.
CDA 4253 FPGA System Design RTL Design Methodology 1 Hao Zheng Comp Sci & Eng USF.
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
ECE DIGITAL LOGIC LECTURE 21: FINITE STATE MACHINE Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 11/24/2015.
ASM block The state box represents the state in the FSM, and the output in the state box describes the desired output values when the FMS enters this state.
George Mason University Design of Controllers using Algorithmic State Machine (ASM) Charts ECE 545 Lecture 12.
Algorithmic State Machine (ASM) Charts: VHDL Code & Timing Diagrams
George Mason University Finite State Machines Refresher ECE 545 Lecture 11.
Figure 8.1. The general form of a sequential circuit.
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code.
Hao Zheng Comp Sci & Eng USF
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
RTL Design Methodology
RTL Design Methodology
Instructor: Alexander Stoytchev
Algorithmic State Machine (ASM) Charts: VHDL Code & Timing Diagrams
RTL Design Methodology
Lecture 18 SORTING in Hardware.
Instructor: Alexander Stoytchev
ECE 545 Lecture 12 Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts.
ECE 545 Lecture 10 Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts.
ECE 545 Lecture 9 Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts.
ECE 545 Lecture 11 Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts.
Instructor: Alexander Stoytchev
RTL Design Methodology Transition from Pseudocode & Interface
KU College of Engineering Elec 204: Digital Systems Design
ASM and Micro-programmed State Machines
Instructor: Alexander Stoytchev
RTL Design Methodology
RTL Design Methodology Transition from Pseudocode & Interface
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code.
RTL Design Methodology
RTL Design Methodology
RTL Design Methodology
RTL Design Methodology Transition from Pseudocode & Interface
RTL Design Methodology
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL code ECE 448 – FPGA and ASIC Design.
RTL Design Methodology
RTL Design Methodology
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
RTL Design Methodology
Presentation transcript:

1 ECE 545 – Introduction to VHDL Algorithmic State Machines Sorting Example ECE 656 Lecture 8

2 ECE 545 – Introduction to VHDL Sources & Required Reading Stephen Brown and Zvonko Vranesic, Fundamentals of Digital Logic with VHDL Design Chapter 8.10 Algorithmic State Machine (ASM) Charts Chapter Sort Operation

3 ECE 545 – Introduction to VHDL Algorithmic State Machine (ASM) Charts

4 ECE 545 – Introduction to VHDL Algorithmic State Machine Algorithmic State Machine – representation of a Finite State Machine suitable for FSMs with a larger number of inputs and outputs compared to FSMs expressed using state diagrams and state tables.

5 ECE 545 – Introduction to VHDL Elements used in ASM charts (1) Output signals or actions (Moore type) State name Condition expression 0 (False) 1 (True) Conditional outputs or actions (Mealy type) (a) State box(b) Decision box (c) Conditional output box

6 ECE 545 – Introduction to VHDL Elements used in ASM charts (2) State box – represents a state. Equivalent to a node in a state diagram or a row in a state table. Moore type outputs are listed inside of the box. It is customary to write only the name of the signal that has to be asserted in the given state, e.g., z instead of z=1. Also, it might be useful to write an action to be taken, e.g., Count = Count + 1, and only later translate it to asserting a control signal that causes a given action to take place.

7 ECE 545 – Introduction to VHDL Elements used in ASM charts (3) Decision box – indicates that a given condition is to be tested and the exit path is to be chosen accordingly The condition expression consists of one or more inputs to the FSM. Conditional output box – denotes output signals that are of the Mealy type. The condition that determines whether such outputs are generated is specified in the decision box.

8 ECE 545 – Introduction to VHDL Moore FSM – Example 1: State diagram Cz1=  Reset Bz0=  Az0= w0= w1= w1= w0= w0= w1=

9 ECE 545 – Introduction to VHDL ASM Chart for Moore FSM – Example 1

10 ECE 545 – Introduction to VHDL A w0=z0=  w1=z1= B w0=z0= Reset w1=z0=  Mealy FSM – Example 2: State diagram

11 ECE 545 – Introduction to VHDL ASM Chart for Mealy FSM – Example 2

12 ECE 545 – Introduction to VHDL Control Unit Example: Arbiter (1) Arbiter reset r1 r2 r3 g1 g2 g3 clock

13 ECE 545 – Introduction to VHDL Idle 000 1xx Reset gnt1g 1  1= x1x gnt2g 2  1= xx1 gnt3g 3  1= 0xx1xx 01xx0x 001xx0 Control Unit Example: Arbiter (2)

14 ECE 545 – Introduction to VHDL Control Unit Example: Arbiter (3)

15 ECE 545 – Introduction to VHDL ASM Chart for Control Unit - Example 3

16 ECE 545 – Introduction to VHDL Digital System Design with VHDL

17 ECE 545 – Introduction to VHDL Structure of a Typical Digital System Execution Unit (Datapath) Control Unit (Control) Data Inputs Data Outputs Control Inputs Control Outputs Control Signals

18 ECE 545 – Introduction to VHDL Hardware Design with RTL VHDL Pseudocode Execution Unit Control Unit Block diagram Block diagram ASM VHDL code Interface

19 ECE 545 – Introduction to VHDL Sorting

20 ECE 545 – Introduction to VHDL Sort Clock Resetn DataIn N DataOut N Sorting - Required Interface Done RAdd L WrInit S (0=initialization 1=computations) Rd

21 ECE 545 – Introduction to VHDL Simulation results for the sort operation (1) Loading the registers and starting sorting

22 ECE 545 – Introduction to VHDL Simulation results for the sort operation (2) Completing sorting and reading out registers

23 ECE 545 – Introduction to VHDL Sorting - Example Before sorting During Sorting After sorting address i=0i=0i=0i=1i=1i=2 j=1j=2j=3j=2j=3j=3 RiRi RjRj Legend: position of memory indexed by i position of memory indexed by j

24 ECE 545 – Introduction to VHDL Pseudocode for the sort operation for i=0 to k2 do A=R i ; for j=i+1 to k1 do B=R j ; if B<A then R i =B ; R j =A ; A=R i ; end if; end for; – –