Advanced FPGA Based System Design Lecture-9 & 10 VHDL Sequential Code By: Dr Imtiaz Hussain 1.

Slides:



Advertisements
Similar presentations
Tutorial 2 Sequential Logic. Registers A register is basically a D Flip-Flop A D Flip Flop has 3 basic ports. D, Q, and Clock.
Advertisements

VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
Synchronous Sequential Logic
© 1998, Peter J. AshendenVHDL Quick Start1 Basic VHDL Concepts Interfaces Behavior Structure Test Benches Analysis, elaboration, simulation Synthesis.
Lecture 12 Latches Section , Block Diagram of Sequential Circuit gates New output is dependent on the inputs and the preceding values.
1 VLSI DESIGN USING VHDL Part II A workshop by Dr. Junaid Ahmed Zubairi.
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
CSE 140L Lecture 4 Flip-Flops, Shifters and Counters Professor CK Cheng CSE Dept. UC San Diego.
Dr. Turki F. Al-Somani VHDL synthesis and simulation – Part 2 Microcomputer Systems Design (Embedded Systems)
Why Behavioral Wait statement Signal Timing Examples of Behavioral Descriptions –ROM.
Kazi Fall 2006 EEGN 4941 EEGN-494 HDL Design Principles for VLSI/FPGAs Khurram Kazi Some of the slides were taken from K Gaj’s lecture slides from GMU’s.
4/10/20081 Lab 9 RT methodology introduction Register operations Data Path Control Path ASM Example TA: Jorge Crichigno.
ENEE 408C Lab Capstone Project: Digital System Design Fall 2005 Sequential Circuit Design.
ECE C03 Lecture 141 Lecture 14 VHDL Modeling of Sequential Machines Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ELEN 468 Advanced Logic Design
Advanced Verilog EECS 270 v10/23/06.
Advanced FPGA Based System Design Lecture-5-6 Introduction to VHDL By: Dr Imtiaz Hussain 1.
Sequential Circuit  It is a type of logic circuit whose output depends not only on the present value of its input signals but on the past history of its.
Overview Logistics Last lecture Today HW5 due today
Introduction to Counter in VHDL
Introduction to VHDL (part 2)
VHDL Introduction. V- VHSIC Very High Speed Integrated Circuit H- Hardware D- Description L- Language.
VHDL IE- CSE. What do you understand by VHDL??  VHDL stands for VHSIC (Very High Speed Integrated Circuits) Hardware Description Language.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
EE3A1 Computer Hardware and Digital Design Lecture 6 supplement Common misunderstandings about VHDL processes.
2-Jun-16EE5141 Chapter 3 ä The concept of the signal ä Process concurrency ä Delta time ä Concurrent and sequential statements ä Process activation by.
Timing Model VHDL uses the following simulation cycle to model the stimulus and response nature of digital hardware Start Simulation Update Signals Execute.
Digital Logic Design.
3/4/20031 ECE 551: Digital System Design * & Synthesis Lecture Set 3 3.1: Verilog - User-Defined Primitives (UDPs) (In separate file) 3.2: Verilog – Operators,
Hardware Description Languages Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
Behavioral Modelling - 1. Verilog Behavioral Modelling Behavioral Models represent functionality of the digital hardware. It describes how the circuit.
Lecture 7 Chap 9: Registers Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Hamming Code,Decoders and D,T-flip flops Prof. Sin-Min Lee Department of Computer Science.
Verilog A Hardware Description Language (HDL ) is a machine readable and human readable language for describing hardware. Verilog and VHDL are HDLs.
VHDL Discussion Finite State Machines IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
VHDL – Behavioral Modeling and Registered Elements ENGIN 341 – Advanced Digital Design University of Massachusetts Boston Department of Engineering Dr.
VHDL Discussion Sequential Sytems. Memory Elements. Registers. Counters IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology.
1 Part III: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
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)
CEC 220 Digital Circuit Design VHDL in Sequential Logic Wednesday, March 25 CEC 220 Digital Circuit Design Slide 1 of 13.
Digital System Design using VHDL
Digital System Design using VHDL
Latches and Flip-Flops
Advanced FPGA Based System Design Lecture-6 & 7 VHDL Data Types By: Dr Imtiaz Hussain 1.
ENG241 Digital Design Week #7 Sequential Circuits (Part B)
VHDL 7: use of signals v.5a1 VHDL 7 Use of signals In processes and concurrent statements.
55:032 - Intro. to Digital DesignPage 1 VHDL and Processes Defining Sequential Circuit Behavior.
CEC 220 Digital Circuit Design Latches and Flip-Flops
George Mason University Behavioral Modeling of Sequential-Circuit Building Blocks ECE 545 Lecture 8.
Joal 2006 HT:1 Em3 Digital Electronics Design 1 Lecture 3-4 Sequential VHDLChap 4.
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.
Lecture #12 Page 1 ECE 4110– Digital Logic Design Lecture #12 Agenda 1.VHDL : Behavioral Design (Processes) Announcements 1.n/a.
1 Introduction to Engineering Spring 2007 Lecture 19: Digital Tools 3.
ECE 4110–5110 Digital System Design
Supplement on Verilog FF circuit examples
EMT 351/4 DIGITAL IC DESIGN Week # Synthesis of Sequential Logic 10.
‘if-else’ & ‘case’ Statements
Part IV: VHDL CODING.
Timing Model Start Simulation Delay Update Signals Execute Processes
Sequential Design.
Sequential-Circuit Building Blocks
RTL Style در RTL مدار ترتيبي به دو بخش (تركيبي و عناصر حافظه) تقسيم مي شود. مي توان براي هر بخش يك پروسس نوشت يا براي هر دو فقط يك پروسس نوشت. مرتضي صاحب.
SYNTHESIS OF SEQUENTIAL LOGIC
Developing More Advanced Testbenches
Advanced FPGA Based System Design
Behavioral Modeling of Sequential-Circuit Building Blocks
Dr. Tassadaq Hussain Introduction to Verilog – Part-3 Expressing Sequential Circuits and FSM.
Sequntial-Circuit Building Blocks
Presentation transcript:

Advanced FPGA Based System Design Lecture-9 & 10 VHDL Sequential Code By: Dr Imtiaz Hussain 1

Contents Introduction Process Signals & Variables IF 2

Introduction VHDL Code is Inherently Concurrent. PROCESSES, FUNCTIONS, and PROCEDURES are the only sections of code that are executed sequentially. One important aspect of sequential code is that it is not limited to sequential logic. With it we can build sequential circuits as well as combinational circuits. Sequential code is also called behavioral code. 3

Introduction The statements discussed in this lecture are all sequential, that is, allowed only inside ROCESSES, FUNCTIONS, or PROCEDURES. They are: IF, WAIT, CASE, and LOOP. 4

Process The statements discussed in this lecture are all sequential, that is, allowed only inside ROCESSES, FUNCTIONS, or PROCEDURES. They are: IF, WAIT, CASE, and LOOP. A PROCESS is a sequential section of VHDL code. It is characterized by the presence of IF, WAIT, CASE, or LOOP, and by a sensitivity list (except when WAIT is used). A PROCESS must be installed in the main code, and is executed every time a signal in the sensitivity list changes (or the condition related to WAIT is fulfilled). 5

Process Its syntax is shown below. 6

Process Example DFF with Asynchronous Reset 7

8

Signals and Variables VHDL has two ways of passing non-static values around: by means of a SIGNAL or by means of a VARIABLE. A SIGNAL can be declared in a PACKAGE, ENTITY or ARCHITECTURE (in its declarative part). While a VARIABLE can only be declared inside a piece of sequential code (in a PROCESS, for example). Therefore the value of the SIGNAL can be global, the VARIABLE is always local. 9

Signals and Variables The value of a VARIABLE can never be passed out of the PROCESS directly. If necessary, then it must be assigned to a SIGNAL. On the other hand, the update of a VARIABLE is immediate, that is, we can promptly count on its new value in the next line of code. That is not the case with a SIGNAL (when used in a PROCESS), for its new value is generally only guaranteed to be available after the conclusion of the present run of the PROCESS. 10

Signals and Variables The assignment operator for a SIGNAL is ‘‘<=’’ (ex: sig <= 5). And for a VARIABLE it is ‘‘:=’’ (ex: var := 5). 11

IF As mentioned earlier, IF, WAIT, CASE, and LOOP are the statements intended for sequential code. Therefore, they can only be used inside a PROCESS, FUNCTION, or PROCEDURE. The natural tendency is for people to use IF more than any other statement. The syntax of IF is shown below. 12

IF (Example) 13

Example: One Digit Counter 1-digit decimal counter (0 to 9 to 0). It contains a single-bit input (clk) and a 4-bit output (digit). A variable, temp, was employed to create the four flip-flops necessary to store the 4-bit output signal. 14

15

Example: One Digit Counter with Asynchronous Reset I/P 16 clk digit(3:0) rst COUNTERCOUNTER

Example: Shift Register Figure shows a 4-bit shift register. The output bit (q) must be four positive clock edges behind the input bit (d). It also contains an asynchronous reset, which must force all flip-flop outputs to ‘0’ when asserted. 17

Example: Shift Register 18

Example: Shift Register 19

WAIT Wait Statement has three different formats. 20

WAIT UNTIL The WAIT UNTIL statement accepts only one signal, thus being more appropriate for synchronous code than asynchronous. Since the PROCESS has no sensitivity list in this case, WAIT UNTIL must be the first statement in the PROCESS. The PROCESS will be executed every time the condition is met. 21

WAIT UNTIL Example 22

WAIT ON WAIT ON, on the other hand, accepts multiple signals. The PROCESS is put on hold until any of the signals listed changes. In the example below, the PROCESS will continue execution whenever a change in rst or clk occurs. 23

WAIT ON In the example below, the PROCESS will continue execution whenever a change in rst or clk occurs. 24

WAIT FOR Finally, WAIT FOR is intended for simulation only (waveform generation for test benches). Example: WAIT FOR 5ns;. 25

Example: DFF DFF with Asynchronous Reset using WAIT ON instead of IF. 26

27

Example: One Digit Counter Use WAIT UNTIL to design a one digit counter 28 clk digit(3:0) rst COUNTERCOUNTER

29

END OF LECTURE-9-10 To download this lecture visit imtiazhussainkalwar.weebly.com 30