Interacting Finite State Machine Design Shaun Murphy.

Slides:



Advertisements
Similar presentations
VHDL 5 FINITE STATE MACHINES (FSM) Some pictures are obtained from FPGA Express VHDL Reference Manual, it is accessible from the machines in the lab at.
Advertisements

VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
COE 405 VHDL Basics Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Dr. Aiman H. El-Maleh Computer Engineering.
CSCI 660 EEGN-CSCI 660 Introduction to VLSI Design Lecture 7 Khurram Kazi.
Synchronous Sequential Logic
Combinational Logic.
2/16/09 Lab 3 Jorge Crichigno. 2/16/09 Half-adder.
© 1998, Peter J. AshendenVHDL Quick Start1 Basic VHDL Concepts Interfaces Behavior Structure Test Benches Analysis, elaboration, simulation Synthesis.
Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
Analysis of Clocked Sequential Circuits
DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali.
9/18/08 Lab 2 - Solution TA: Jorge. 9/18/08 Half-adder.
10/13/2005Comp 120 Fall October Questions? Today Control.
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
Why Behavioral Wait statement Signal Timing Examples of Behavioral Descriptions –ROM.
ELEN 468 Lecture 161 ELEN 468 Advanced Logic Design Lecture 16 Synthesis of Language Construct II.
Topics of Lecture Structural Model Procedures Functions Overloading.
VHDL Intro What does VHDL stand for? VHSIC Hardware Description Language VHSIC = Very High Speed Integrated Circuit Developed in 1982 by Govt. to standardize.
ECE C03 Lecture 141 Lecture 14 VHDL Modeling of Sequential Machines Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Advanced Verilog EECS 270 v10/23/06.
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
Introduction to VHDL (part 2)
Advanced FPGA Based System Design Lecture-9 & 10 VHDL Sequential Code By: Dr Imtiaz Hussain 1.
Modeling styles: 1. Structural Modeling: As a set of interconnected components (to represent structure), 2. Dataflow Modeling: As a set of concurrent assignment.
IAY 0600 Digitaalsüsteemide disain Event-Driven Simulation Alexander Sudnitson Tallinn University of Technology.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Fall 2012 Chapter 2: x86 Processor Architecture. Irvine, Kip R. Assembly Language for x86 Processors 6/e, Chapter Overview General Concepts IA-32.
Chapter 10 State Machine Design. 2 State Machine Definitions State Machine: A synchronous sequential circuit consisting of a sequential logic section.
VHDL IE- CSE. What do you understand by VHDL??  VHDL stands for VHSIC (Very High Speed Integrated Circuits) Hardware Description Language.
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
2-Jun-16EE5141 Chapter 3 ä The concept of the signal ä Process concurrency ä Delta time ä Concurrent and sequential statements ä Process activation by.
Basic Concepts in VHDL Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Computer Organization & Programming Chapter 5 Synchronous Components.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Identifiers: –basic identifier: composed of a sequence of one or more.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Modern VLSI Design 4e: Chapter 8 Copyright  2008 Wayne Wolf Topics VHDL register-transfer modeling: –basics using traffic light controller; –synthesis.
Timing Model VHDL uses the following simulation cycle to model the stimulus and response nature of digital hardware Start Simulation Update Signals Execute.
Behavioral Modelling - 1. Verilog Behavioral Modelling Behavioral Models represent functionality of the digital hardware. It describes how the circuit.
VHDL Discussion Finite State Machines
Finite state machines Modelling FSM in VHDL. Types of automata (FSM) A sequential automaton has: –Inputs –States (a finite number of states) –Outputs.
VHDL Discussion Finite State Machines IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
VHDL Discussion Sequential Sytems. Memory Elements. Registers. Counters IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology.
CEC 220 Digital Circuit Design Latches and Flip-Flops Monday, March 03 CEC 220 Digital Circuit Design Slide 1 of 19.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
VHDL Discussion Subprograms IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
Digital System Design using VHDL
Digital System Design using VHDL
1/8/ L11 Project Step 5Copyright Joanne DeGroat, ECE, OSU1 Project Step 7 Behavioral modeling of a dual ported register set.
55:032 - Intro. to Digital DesignPage 1 VHDL and Processes Defining Sequential Circuit Behavior.
ECE DIGITAL LOGIC LECTURE 21: FINITE STATE MACHINE Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 11/24/2015.
Lecture #12 Page 1 ECE 4110– Digital Logic Design Lecture #12 Agenda 1.VHDL : Behavioral Design (Processes) Announcements 1.n/a.
ECE 4110–5110 Digital System Design
Finite State Machines (part 1)
HDL simulation and Synthesis (Marks16)
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
Timing Model Start Simulation Delay Update Signals Execute Processes
Some VHDL Details 10/8/08 ECE Lecture 8.
Sequential Design.
Lecture 16 Arithmetic Circuits
VHDL 5 FINITE STATE MACHINES (FSM)
Loop Control Structure.
VHDL Discussion Subprograms
22 October 3 classes before 2nd exam! Control 1/16/2019
VHDL Discussion Subprograms
VHDL Programming (08 Marks)
Finite state machines Modelling FSM in VHDL.
Sequntial-Circuit Building Blocks
Presentation transcript:

Interacting Finite State Machine Design Shaun Murphy

Problem Statement If transmitter is not busy: the processor sets the data to be transmitted on a data bus and sends a signal to the transmitter to load the data and begin the transmission sequence Once the transmitter has begun transferring the signal, it sets busy and no longer receives data from the processor

Problem Statement (Con’t) The receiver should be implemented dependant on a software defined clock divided window When a generated clock signal is created, the receiver’s lines are loaded. Realization should not include propagation delays.

State Diagrams

Timing Transmitter

Timing Receiver

Multiple (Interacting) Processes Since a process statement is a concurrent statement, it is possible to have more than one process within an architecture body. This makes interacting finite state machines easy to implement. Processes communicate with each other using signals public to all processes. Variables declared within a process are not visible outside.

Behavioral Modeling The behavior of the entity is expressed using sequentially executed, procedural code. A process statement is the primary mechanism used to model the behavior of the entity. Every entity represented using an entity declaration and at least one architecture body.

Transmitter States entity FSM1 is port (CLOCK:in); port (CLOCK:in); end FSM1; architecture TRANSMIT of FSM1 is type MP_STATE_TYPE is (M1,M2,M3); type MP_STATE_TYPE is (M1,M2,M3); type TX_STATE_TYPE is (T1,T2,T3,T4); type TX_STATE_TYPE is (T1,T2,T3,T4); signal MP_STATE: MP_STATE_TYPE; signal MP_STATE: MP_STATE_TYPE; signal TX_STATE: TX_STATE_TYPE; signal TX_STATE: TX_STATE_TYPE; signal LOAD_TX, TX_BUSY: BIT; signal LOAD_TX, TX_BUSY: BIT; -- Entity declarations are the ‘black-box’ view -- Clock is an input signal -- Internal view of the entity -- Enumeration types -- Signal declarations -- MP_STATE is of type MP_STATE_TYPE -- Initial (left most) value of BIT is ‘0’

Transmitter Process Statements begin MP: process MP: process begin begin wait until CLOCK='0'; wait until CLOCK='0'; case MP_STATE is case MP_STATE is -- load data -- load data when M1 => when M1 => LOAD_TX <='1'; LOAD_TX <='1'; MP_STATE <=M2; MP_STATE <=M2; when M2 => when M2 => if TX_BUSY ='1' then if TX_BUSY ='1' then LOAD_TX <='0'; LOAD_TX <='0'; MP_STATE <=M3; MP_STATE <=M3; end if; end if; -- wait for TX to complete -- wait for TX to complete when M3 => when M3 => if TX_BUSY ='0' then if TX_BUSY ='0' then MP_STATE <=M1; MP_STATE <=M1; end if; end if; end case; end case; end process MP; end process MP; -- Process statements contain sequential statements -- First way to be sensitive to a falling edge event -- Signal assignment statement (no delay) -- Since these occur inside a process, sequential

TX: process (CLOCK) TX: process (CLOCK) begin begin if CLOCK='0' then if CLOCK='0' then case TX_STATE is case TX_STATE is -- wait for load data -- wait for load data when T1 => when T1 => if LOAD_TX ='1' then if LOAD_TX ='1' then TX_STATE <=T2; TX_STATE <=T2; -- read data -- read data TX_BUSY <='1'; TX_BUSY <='1'; end if; end if; -- transmitting data -- transmitting data when T2 => when T2 => TX_STATE <=T3; TX_STATE <=T3; when T3 => when T3 => TX_STATE <=T4; TX_STATE <=T4; -- transmission complete -- transmission complete when T4 => when T4 => TX_BUSY <='0' TX_BUSY <='0' TX_STATE <=T1; TX_STATE <=T1; end case; end case; end if; end if; end process TX; end process TX; end TRANSMIT; -- TX is sensitive on a CLOCK event (second method) -- Check to see if this is falling edge -- Select appropriate branch for execution. -- process suspends until another clock event

Receiver Source architecture RECEIVER of FSM2 is type DIV_STATE_TYPE is (D1,D2,D3); type DIV_STATE_TYPE is (D1,D2,D3); type RX_STATE_TYPE is (R1,R2); type RX_STATE_TYPE is (R1,R2); signal DIV_STATE: DIV_STATE_TYPE; signal DIV_STATE: DIV_STATE_TYPE; signal RX_STATE: RX_STATE_TYPE; signal RX_STATE: RX_STATE_TYPE; signal NEW_CLOCK: BIT; signal NEW_CLOCK: BIT; -- Signal CLOCK is an input port. -- Signal CLOCK is an input port. -- new architecture for a different entity -- enumeration types

Receiver Process Statements begin DIVIDER: process DIVIDER: process begin begin wait until CLOCK='1' wait until CLOCK='1' case DIV_STATE is case DIV_STATE is when D1 => DIV_STATE DIV_STATE <= D2; NEW_CLOCK <='0‘; when D2 => DIV_STATE DIV_STATE <= D3; when D3 => NEW_CLOCK NEW_CLOCK <='1'; DIV_STATE <=D1; end case; end case; end process DIVIDER; end process DIVIDER; RX: process RX: process begin begin wait until NEW_CLOCK ='0'; wait until NEW_CLOCK ='0'; case RX_STATE is case RX_STATE is when R1 => RX_STATE RX_STATE <=R2; when R2 => RX_STATE RX_STATE <=R1; end case; end case; end process RX; end process RX; end architecture RECEIVER; -- new process -- this process waits for a rising edge -- this process waits for the trailing edge on the new clock -- the receiver simply changes state. In the real system, the receiver would have some READ_WORD procedure