SlideShare a Scribd company logo
1 of 78
Download to read offline
Ibrahim Mezzah
Introduction
Design abstraction levels timeline
1987 - VHDL
IEEE standard
Introduction
What is VHDL?
V: VHSIC or Very High-Speed Integrated Circuit.
HDL: Hardware Description Language.
 VHDL is a true computer language with the
accompanying set of syntax and usage rules.
 As opposed to higher-level computer languages,
VHDL is primarily used to describe hardware.
Hardware description languages Higher-level computer languages
Introduction
Pay attention!!
 The common mistake made by someone is to attempt to
program in VHDL as they would program a higher-level
computer language. Higher-level computer languages are
sequential in nature; VHDL is not.
 VHDL is a concurrent language: VHDL instructions are all
executed at the same time (concurrently).
 Higher-level computer languages are used to describe
algorithms (sequential execution) and VHDL is used to describe
hardware (parallel execution).
Introduction
Golden Rules of VHDL
 VHDL is a hardware-design language
When you are working with VHDL, you are not programming, you are
"designing hardware". Your VHDL code should reflect this fact. If your
VHDL code appears too similar to code of a higher-level computer
language, it is probably bad VHDL code.
 Have a general concept of what your hardware should look like
Although VHDL is vastly powerful, if you do not understand basic
digital constructs, you will probably be unable to generate efficient
digital circuits. If you are not able to roughly envision the digital
circuit you are trying to model in terms of basic digital circuits, you
will probably misuse VHDL.
VHDL Invariants
Case Sensitivity
White Space
VHDL is not sensitive to white space (spaces and tabs).
Comments
Comments in VHDL begin with the symbol "--" (two consecutive dashes).
VHDL is not case sensitive.
VHDL Invariants
Parentheses
VHDL Statements
Similar to other algorithmic computer languages, every VHDL statement
is terminated with a semicolon ";".
VHDL is relatively lax on its requirement for using parentheses.
VHDL Invariants
Identifiers
An identifier refers to the name given to various items in VHDL (variable names,
signal names and port names …etc).
 Identifiers can be as long as you want (contain many characters).
 Identifiers can only contain a combination of letters (A-Z and a-z), digits
(0-9) and the underscore character ("_").
 Identifiers must start with an alphabetic character.
VHDL Invariants
Reserved Words
There is a list of words that have been assigned special meaning by the VHDL
language. These special words, usually referred to as reserved words, cannot be
used as identifiers when writing VHDL code.
VHDL Design Units
VHDL description organisation
VHDL Design Units
VHDL Standard Libraries
VHDL Design Units
Entity declaration
The VHDL entity provides a simple wrapper for the
lower-level circuitry. This wrapper effectively describes
how the black box interfaces with the outside world.
 Each port name is unique and has an associated mode and data type.
 The VHDL compiler allows several port names to be included on a
single line. Port names are separated by commas.
 These input and output signals are associated with the keywords in,
out, inout or buffer.
Black-box
VHDL Design Units
Entity declaration
 As specified in the
package, the
implementation of the
type (and the
type) includes 9 different values:
0,1,U,X,Z,W,L,H,-.
The signals in the bus can be listed in one of two orders which are
specified by the to and downto keywords.
MSB LSB MSB LSB
VHDL Design Units
Entity declaration – Exercise 1
Write VHDL entity declarations that describe the following
black-box diagrams:
VHDL Design Units
Entity declaration – Exercise 2
Provide black-box diagrams that are defined by the following
VHDL entity declarations:
Are there any errors!?
VHDL Design Units
Architecture
The architecture describes what the circuit actually does. In other words,
the VHDL architecture describes the internal implementation of the
associated entity.
Several possible implementations (models) of the same behavior are
possible in VHDL:
 The data-flow model,
 The behavioral model,
 The structural model,
 Any combination of these three, generally called the hybrid models.
Data-flow model
VHDL Design Units
Signal and Variable Assignments
In VHDL there are several object types:
 The signal object type: is the representation of a wire.
 The variable object type: used to store local information.
 The constant object type: used to store constant values.
To assign a new value to a signal you use the operator "<=".
To assign a new value to a variable you use the operator ":=".
VHDL Assignment
Concurrent Statements
The main design consideration in VHDL modeling supports the fact that
digital circuits operate in parallel.
Each concurrent statement is
interpreted as acting in parallel
(concurrently) to other
concurrent statements.
VHDL Assignment
Assignment types in VHDL
The major signal assignment types in VHDL are:
 Concurrent signal assignment
 Conditional signal assignment
 Selected signal assignment
 Process statements
VHDL Assignment
Concurrent signal assignment
 The target is a signal that receives the values of the expression.
VHDL Assignment
Conditional signal assignment
 The term conditional signal assignment is used to describe
statements that have only one target but can have more than one
associated expression assigned to the target.
VHDL Assignment
Conditional signal assignment - Example
VHDL Assignment
Selected signal assignment
 Selected signal assignment statements differ from conditional
assignment statements in that assignments are based upon the
evaluation of one expression.
VHDL Assignment
Selected signal assignment – Example 1
VHDL Assignment
Selected signal assignment – Example 2
VHDL Assignment
Selected signal assignment – Example 3
VHDL Assignment
Process statements
 The process statement itself is a concurrent statement identified by its label,
its sensitivity list, a declaration area and a begin-end area containing
instructions executed sequentially.
 The execution of the sequential statements is initiated when a change in the
signal contained in the process sensitivity list occurs.
VHDL Assignment
Process statements
VHDL Assignment
Process statements – Example
Sequential Statements
There are 3 types of sequential statements:
 Signal assignment statement
 statement
 statement
Sequential Statements
 Signal assignment statement
 The target is a signal that receives the values of the expression.
Sequential Statements
 statement
 The statement is used to create a branch in the execution flow of the
sequential statements.
 Each -type statement contains an associated keyword. The final
clause does not have the keyword associated with it.
Sequential Statements
 statement – Example 1
Sequential Statements
 statement – Example 2
Sequential Statements
 statement – Example 3
Sequential Statements
 statement – Example 4
Using statement for Sequential Circuits (D flip-flop)
Sequential Statements
 statement – Example 5
Using statement for Sequential Circuits (D flip-flop)
Sequential Statements
 statement – Exercise 1
Design a 4-bit parallel-in register.
Sequential Statements
 statement – Exercise 2
Design a Serial-in shift register.
Sequential Statements
 statement
 The statement is somewhat similar to the statement in that a
sequence of statements is executed an associated expression is true.
 The statement differs from the statement in that the resulting
choice is made depending upon the value of the single control expression.
Sequential Statements
 statement – Example 1 F_OUT = A · B · C + B · C
 statement – Example 2
Sequential Statements
VHDL Operators
VHDL operators
 Operators in VHDL are grouped into seven different types:
logical, relational, shift, addition, unary, multiplying and others.
VHDL Operators
VHDL shift operators
Shift Operator
VHDL Operators
 The concatenation operator is often a useful operator when
dealing with digital circuits.
 There are many times when you will find a need to tack
together two separate values.
Concatenation operator
Data Objects
Types of Data Objects
 There are four types of data objects in VHDL:
signals, variables, constants and files.
 File data objects, exclusively used in simulations.
Data Objects
Types of Data Objects
 Each of the data objects can optionally be assigned initial values.
 Signal declarations do not usually include initial values as opposed to
constants which generally do.
 Initial values for signals are in fact not implementable on silicon by
the synthesizing tools but are taken into consideration by VHDL
simulation tools.
Data Objects
Signals vs. Variables
 The use of signals and variables can be somewhat confusing because
of their similarities.
 A signal can be thought of as representing a wire or some type of
physical connection in a design.
 Assignments made to signals inside a process are actually only
scheduled when the same process is completed. The actual
assignment is not made until after the process terminates.
 Variable assignment within processes is different. When a variable is
assigned a value inside of a process, the assignment is immediate and
the newly assigned value can be used immediately inside of the
process.
 Variables should only be used as iteration counters in loops or as
temporary values when executing an algorithm that performs some
type of calculation. It is possible to use variables outside of these
areas, but it should be avoided.
Data Objects
Signals vs. Variables (example)
Data Objects
Standard Data Types
List of some VHDL data types:
Data Objects
User-Defined Types
 VHDL allows you to dene your own data type. A typical
example of custom integer type is:
 Obviously it is possible to dene more complex data structures.
Data Objects
Commonly Used Types
Data Objects
Type
 The type is defined in the VHDL package
and provides a common
standard that can be used in VHDL.
Finite State Machine (FSM) Design Using VHDL
 Finite state machines (FSMs) are mathematical abstractions
that are used to solve a large variety of problems, among
which are electronic design automation, communication
protocol design, parsing and other engineering applications.
Block diagram for a Moore-type FSM
Finite State Machine (FSM) Design Using VHDL
FSM Example
Finite State Machine (FSM) Design Using VHDL
FSM Example
FSM Design Using VHDL
FSM Example
FSM Design Using VHDL
FSM Example
FSM Design Using VHDL
FSM Example
FSM Design Using VHDL
FSM Example
FSM Design Using VHDL
Exercise - traffic light FSM
Black box view of the
finite state machine
Campus map
Design this traffic light FSM
FSM Design Using VHDL
Exercise - traffic light FSM
Structural Modeling In VHDL
 Structural modeling in VHDL
supports hierarchical design
concepts. The ability to abstract
digital circuits to higher levels is
the key to understanding and
designing complex digital
circuits.
 The VHDL structural model
supports the reuse of design
units. This includes units you
have previously designed as well
as the ability to use predefined
module libraries.
Hierarchy design flow example
of an MCU
MCIP
MCU
Basic
components
Configurable
components
Peripherals
Interrupt
Controller
Address
Decoder
CPU
PLL
Reset
Module
Program
Counter
Operation
Unit
Data Address
Provider
Instruction
Decoder
Table Read
and Write
Watchdog
Ports
Timers
MSSPs
ALU
Multiplier
Decoder
Instruction
Manager
Program
Memory
Data
Memory
Memory
Controllers
Structural Modeling In VHDL
VHDL Modularity with Components
The approach to use a component in VHDL is:
1) Name the module you plan to describe (the entity) and describe
what the module will do (the architecture),
2) Let the design tool know the module exists and can be used
(component declaration),
3) Declare required internal signals used to connect the design units.
Structural Modeling In VHDL
VHDL Modularity with Components
4) Use the module in your code (component instantiation, or mapping).
Structural Modeling In VHDL
VHDL Modularity with Components
AND
Can be replaced with:
Structural Modeling In VHDL
Construction of parametrised components (Generics)
 Generics allow the component to be customised.
 The values assigned to generics in the component instantiation will override any initial
values assigned to the generic in the entity statement or component declaration.
 Generics can be of any type.
Structural Modeling In VHDL
Generic Map
Structural Modeling In VHDL
Generate Statement
 The generate statement simplifies description of regular design structures.
 Usually it is used to specify a group of identical components using just one
component specification and repeating it using the generate mechanism.
 A generate statement consists of three main parts:
• generation scheme (either for scheme or if scheme);
• declarative part (local declarations of subprograms, types, signals,
constants, components, attributes, configurations, files and groups);
• concurrent statements.
Structural Modeling In VHDL
Generate Statement - Example
Structural Modeling In VHDL
Generate Statement – Exercise (generic adder)
Looping Constructs
 There are two types of loops in VHDL: loops and loops.
 Since these two types of loops are both sequential statements, they
can only appear inside processes.
 If you know the number of iterations the loop requires, you should use
a loop.
 The loop should be used when you do not know the number of
iterations the loop needs to perform.
Looping Constructs
Bibliography
Bryan Mealy, Fabrizio Tappero,
“Free Range VHDL” 2013.
http://freerangefactory.org/pdf/free_range_vhdl.pdf

More Related Content

What's hot

VHDL-PRESENTATION.ppt
VHDL-PRESENTATION.pptVHDL-PRESENTATION.ppt
VHDL-PRESENTATION.pptDr.YNM
 
VLSI Technology Trends
VLSI Technology TrendsVLSI Technology Trends
VLSI Technology TrendsUsha Mehta
 
Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming Dr. Pankaj Zope
 
I2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication ProtocolI2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication ProtocolAnkur Soni
 
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...Khushboo Jain
 
Chapter 5 introduction to VHDL
Chapter 5 introduction to VHDLChapter 5 introduction to VHDL
Chapter 5 introduction to VHDLSSE_AndyLi
 
Introduction to System verilog
Introduction to System verilog Introduction to System verilog
Introduction to System verilog Pushpa Yakkala
 
Overview of digital design with Verilog HDL
Overview of digital design with Verilog HDLOverview of digital design with Verilog HDL
Overview of digital design with Verilog HDLanand hd
 
Verilog overview
Verilog overviewVerilog overview
Verilog overviewposdege
 

What's hot (20)

VHDL-PRESENTATION.ppt
VHDL-PRESENTATION.pptVHDL-PRESENTATION.ppt
VHDL-PRESENTATION.ppt
 
VLSI Technology Trends
VLSI Technology TrendsVLSI Technology Trends
VLSI Technology Trends
 
Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming
 
I2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication ProtocolI2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication Protocol
 
Vlsi design
Vlsi designVlsi design
Vlsi design
 
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...
 
Behavioral modelling in VHDL
Behavioral modelling in VHDLBehavioral modelling in VHDL
Behavioral modelling in VHDL
 
Asic design flow
Asic design flowAsic design flow
Asic design flow
 
Chapter 5 introduction to VHDL
Chapter 5 introduction to VHDLChapter 5 introduction to VHDL
Chapter 5 introduction to VHDL
 
Coding style for good synthesis
Coding style for good synthesisCoding style for good synthesis
Coding style for good synthesis
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
Clock Tree Synthesis.pdf
Clock Tree Synthesis.pdfClock Tree Synthesis.pdf
Clock Tree Synthesis.pdf
 
Introduction to System verilog
Introduction to System verilog Introduction to System verilog
Introduction to System verilog
 
Verilog HDL
Verilog HDLVerilog HDL
Verilog HDL
 
Layout02 (1)
Layout02 (1)Layout02 (1)
Layout02 (1)
 
Overview of digital design with Verilog HDL
Overview of digital design with Verilog HDLOverview of digital design with Verilog HDL
Overview of digital design with Verilog HDL
 
Verilog overview
Verilog overviewVerilog overview
Verilog overview
 
Unit v. HDL Synthesis Process
Unit v. HDL Synthesis ProcessUnit v. HDL Synthesis Process
Unit v. HDL Synthesis Process
 
Actel fpga
Actel fpgaActel fpga
Actel fpga
 
CPLDs
CPLDsCPLDs
CPLDs
 

Similar to VHDL course

the-vhsic-.pptx
the-vhsic-.pptxthe-vhsic-.pptx
the-vhsic-.pptxjpradha86
 
Prilimanary Concepts of VHDL by Dr.R.Prakash Rao
Prilimanary Concepts of VHDL by    Dr.R.Prakash RaoPrilimanary Concepts of VHDL by    Dr.R.Prakash Rao
Prilimanary Concepts of VHDL by Dr.R.Prakash Raorachurivlsi
 
OVERVIEW OF HARDWARE DESCRIPTION LANGUAGES (HDLs)
OVERVIEW OF HARDWARE DESCRIPTION LANGUAGES (HDLs) OVERVIEW OF HARDWARE DESCRIPTION LANGUAGES (HDLs)
OVERVIEW OF HARDWARE DESCRIPTION LANGUAGES (HDLs) Dr.YNM
 
VHDL_Lecture_new1 [Autosaved].ppt
VHDL_Lecture_new1 [Autosaved].pptVHDL_Lecture_new1 [Autosaved].ppt
VHDL_Lecture_new1 [Autosaved].pptNAVEENM849290
 
Design And Simulation of Electronic Circuits Lec_02
Design And Simulation of Electronic Circuits Lec_02Design And Simulation of Electronic Circuits Lec_02
Design And Simulation of Electronic Circuits Lec_02Mohamed Atef
 
vlsi introduction to hdl and its typesunit-1.pptx
vlsi introduction to hdl and its typesunit-1.pptxvlsi introduction to hdl and its typesunit-1.pptx
vlsi introduction to hdl and its typesunit-1.pptxiconicyt2
 
Lecture2 vhdl refresher
Lecture2 vhdl refresherLecture2 vhdl refresher
Lecture2 vhdl refresherNima Shafiee
 
session two hardware description language
session  two hardware description languagesession  two hardware description language
session two hardware description languagedhananjeyanrece
 
Ece iv-fundamentals of hdl [10 ec45]-notes
Ece iv-fundamentals of hdl [10 ec45]-notesEce iv-fundamentals of hdl [10 ec45]-notes
Ece iv-fundamentals of hdl [10 ec45]-notessiddu kadiwal
 

Similar to VHDL course (20)

the-vhsic-.pptx
the-vhsic-.pptxthe-vhsic-.pptx
the-vhsic-.pptx
 
Dica ii chapter slides
Dica ii chapter slidesDica ii chapter slides
Dica ii chapter slides
 
Vhdl
VhdlVhdl
Vhdl
 
Prilimanary Concepts of VHDL by Dr.R.Prakash Rao
Prilimanary Concepts of VHDL by    Dr.R.Prakash RaoPrilimanary Concepts of VHDL by    Dr.R.Prakash Rao
Prilimanary Concepts of VHDL by Dr.R.Prakash Rao
 
Vhdl 1 ppg
Vhdl 1 ppgVhdl 1 ppg
Vhdl 1 ppg
 
OVERVIEW OF HARDWARE DESCRIPTION LANGUAGES (HDLs)
OVERVIEW OF HARDWARE DESCRIPTION LANGUAGES (HDLs) OVERVIEW OF HARDWARE DESCRIPTION LANGUAGES (HDLs)
OVERVIEW OF HARDWARE DESCRIPTION LANGUAGES (HDLs)
 
DLD5.pdf
DLD5.pdfDLD5.pdf
DLD5.pdf
 
VHDL_Lecture_new1 [Autosaved].ppt
VHDL_Lecture_new1 [Autosaved].pptVHDL_Lecture_new1 [Autosaved].ppt
VHDL_Lecture_new1 [Autosaved].ppt
 
VHDL lecture 1.ppt
VHDL lecture 1.pptVHDL lecture 1.ppt
VHDL lecture 1.ppt
 
vhdl
vhdlvhdl
vhdl
 
Vlsi(2)
Vlsi(2)Vlsi(2)
Vlsi(2)
 
VHDL_VIKAS.pptx
VHDL_VIKAS.pptxVHDL_VIKAS.pptx
VHDL_VIKAS.pptx
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introduction
 
Design And Simulation of Electronic Circuits Lec_02
Design And Simulation of Electronic Circuits Lec_02Design And Simulation of Electronic Circuits Lec_02
Design And Simulation of Electronic Circuits Lec_02
 
vlsi introduction to hdl and its typesunit-1.pptx
vlsi introduction to hdl and its typesunit-1.pptxvlsi introduction to hdl and its typesunit-1.pptx
vlsi introduction to hdl and its typesunit-1.pptx
 
Lecture2 vhdl refresher
Lecture2 vhdl refresherLecture2 vhdl refresher
Lecture2 vhdl refresher
 
session two hardware description language
session  two hardware description languagesession  two hardware description language
session two hardware description language
 
Wi Fi documantation
Wi Fi documantationWi Fi documantation
Wi Fi documantation
 
VHDL - Part 2
VHDL - Part 2VHDL - Part 2
VHDL - Part 2
 
Ece iv-fundamentals of hdl [10 ec45]-notes
Ece iv-fundamentals of hdl [10 ec45]-notesEce iv-fundamentals of hdl [10 ec45]-notes
Ece iv-fundamentals of hdl [10 ec45]-notes
 

Recently uploaded

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 

Recently uploaded (20)

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 

VHDL course

  • 2. Introduction Design abstraction levels timeline 1987 - VHDL IEEE standard
  • 3. Introduction What is VHDL? V: VHSIC or Very High-Speed Integrated Circuit. HDL: Hardware Description Language.  VHDL is a true computer language with the accompanying set of syntax and usage rules.  As opposed to higher-level computer languages, VHDL is primarily used to describe hardware. Hardware description languages Higher-level computer languages
  • 4. Introduction Pay attention!!  The common mistake made by someone is to attempt to program in VHDL as they would program a higher-level computer language. Higher-level computer languages are sequential in nature; VHDL is not.  VHDL is a concurrent language: VHDL instructions are all executed at the same time (concurrently).  Higher-level computer languages are used to describe algorithms (sequential execution) and VHDL is used to describe hardware (parallel execution).
  • 5. Introduction Golden Rules of VHDL  VHDL is a hardware-design language When you are working with VHDL, you are not programming, you are "designing hardware". Your VHDL code should reflect this fact. If your VHDL code appears too similar to code of a higher-level computer language, it is probably bad VHDL code.  Have a general concept of what your hardware should look like Although VHDL is vastly powerful, if you do not understand basic digital constructs, you will probably be unable to generate efficient digital circuits. If you are not able to roughly envision the digital circuit you are trying to model in terms of basic digital circuits, you will probably misuse VHDL.
  • 6. VHDL Invariants Case Sensitivity White Space VHDL is not sensitive to white space (spaces and tabs). Comments Comments in VHDL begin with the symbol "--" (two consecutive dashes). VHDL is not case sensitive.
  • 7. VHDL Invariants Parentheses VHDL Statements Similar to other algorithmic computer languages, every VHDL statement is terminated with a semicolon ";". VHDL is relatively lax on its requirement for using parentheses.
  • 8. VHDL Invariants Identifiers An identifier refers to the name given to various items in VHDL (variable names, signal names and port names …etc).  Identifiers can be as long as you want (contain many characters).  Identifiers can only contain a combination of letters (A-Z and a-z), digits (0-9) and the underscore character ("_").  Identifiers must start with an alphabetic character.
  • 9. VHDL Invariants Reserved Words There is a list of words that have been assigned special meaning by the VHDL language. These special words, usually referred to as reserved words, cannot be used as identifiers when writing VHDL code.
  • 10. VHDL Design Units VHDL description organisation
  • 11. VHDL Design Units VHDL Standard Libraries
  • 12. VHDL Design Units Entity declaration The VHDL entity provides a simple wrapper for the lower-level circuitry. This wrapper effectively describes how the black box interfaces with the outside world.  Each port name is unique and has an associated mode and data type.  The VHDL compiler allows several port names to be included on a single line. Port names are separated by commas.  These input and output signals are associated with the keywords in, out, inout or buffer. Black-box
  • 13. VHDL Design Units Entity declaration  As specified in the package, the implementation of the type (and the type) includes 9 different values: 0,1,U,X,Z,W,L,H,-. The signals in the bus can be listed in one of two orders which are specified by the to and downto keywords. MSB LSB MSB LSB
  • 14. VHDL Design Units Entity declaration – Exercise 1 Write VHDL entity declarations that describe the following black-box diagrams:
  • 15. VHDL Design Units Entity declaration – Exercise 2 Provide black-box diagrams that are defined by the following VHDL entity declarations: Are there any errors!?
  • 16. VHDL Design Units Architecture The architecture describes what the circuit actually does. In other words, the VHDL architecture describes the internal implementation of the associated entity. Several possible implementations (models) of the same behavior are possible in VHDL:  The data-flow model,  The behavioral model,  The structural model,  Any combination of these three, generally called the hybrid models. Data-flow model
  • 17. VHDL Design Units Signal and Variable Assignments In VHDL there are several object types:  The signal object type: is the representation of a wire.  The variable object type: used to store local information.  The constant object type: used to store constant values. To assign a new value to a signal you use the operator "<=". To assign a new value to a variable you use the operator ":=".
  • 18. VHDL Assignment Concurrent Statements The main design consideration in VHDL modeling supports the fact that digital circuits operate in parallel. Each concurrent statement is interpreted as acting in parallel (concurrently) to other concurrent statements.
  • 19. VHDL Assignment Assignment types in VHDL The major signal assignment types in VHDL are:  Concurrent signal assignment  Conditional signal assignment  Selected signal assignment  Process statements
  • 20. VHDL Assignment Concurrent signal assignment  The target is a signal that receives the values of the expression.
  • 21. VHDL Assignment Conditional signal assignment  The term conditional signal assignment is used to describe statements that have only one target but can have more than one associated expression assigned to the target.
  • 22. VHDL Assignment Conditional signal assignment - Example
  • 23. VHDL Assignment Selected signal assignment  Selected signal assignment statements differ from conditional assignment statements in that assignments are based upon the evaluation of one expression.
  • 24. VHDL Assignment Selected signal assignment – Example 1
  • 25. VHDL Assignment Selected signal assignment – Example 2
  • 26. VHDL Assignment Selected signal assignment – Example 3
  • 27. VHDL Assignment Process statements  The process statement itself is a concurrent statement identified by its label, its sensitivity list, a declaration area and a begin-end area containing instructions executed sequentially.  The execution of the sequential statements is initiated when a change in the signal contained in the process sensitivity list occurs.
  • 30. Sequential Statements There are 3 types of sequential statements:  Signal assignment statement  statement  statement
  • 31. Sequential Statements  Signal assignment statement  The target is a signal that receives the values of the expression.
  • 32. Sequential Statements  statement  The statement is used to create a branch in the execution flow of the sequential statements.  Each -type statement contains an associated keyword. The final clause does not have the keyword associated with it.
  • 36. Sequential Statements  statement – Example 4 Using statement for Sequential Circuits (D flip-flop)
  • 37. Sequential Statements  statement – Example 5 Using statement for Sequential Circuits (D flip-flop)
  • 38. Sequential Statements  statement – Exercise 1 Design a 4-bit parallel-in register.
  • 39. Sequential Statements  statement – Exercise 2 Design a Serial-in shift register.
  • 40. Sequential Statements  statement  The statement is somewhat similar to the statement in that a sequence of statements is executed an associated expression is true.  The statement differs from the statement in that the resulting choice is made depending upon the value of the single control expression.
  • 41. Sequential Statements  statement – Example 1 F_OUT = A · B · C + B · C
  • 42.  statement – Example 2 Sequential Statements
  • 43. VHDL Operators VHDL operators  Operators in VHDL are grouped into seven different types: logical, relational, shift, addition, unary, multiplying and others.
  • 44. VHDL Operators VHDL shift operators Shift Operator
  • 45. VHDL Operators  The concatenation operator is often a useful operator when dealing with digital circuits.  There are many times when you will find a need to tack together two separate values. Concatenation operator
  • 46. Data Objects Types of Data Objects  There are four types of data objects in VHDL: signals, variables, constants and files.  File data objects, exclusively used in simulations.
  • 47. Data Objects Types of Data Objects  Each of the data objects can optionally be assigned initial values.  Signal declarations do not usually include initial values as opposed to constants which generally do.  Initial values for signals are in fact not implementable on silicon by the synthesizing tools but are taken into consideration by VHDL simulation tools.
  • 48. Data Objects Signals vs. Variables  The use of signals and variables can be somewhat confusing because of their similarities.  A signal can be thought of as representing a wire or some type of physical connection in a design.  Assignments made to signals inside a process are actually only scheduled when the same process is completed. The actual assignment is not made until after the process terminates.  Variable assignment within processes is different. When a variable is assigned a value inside of a process, the assignment is immediate and the newly assigned value can be used immediately inside of the process.  Variables should only be used as iteration counters in loops or as temporary values when executing an algorithm that performs some type of calculation. It is possible to use variables outside of these areas, but it should be avoided.
  • 49. Data Objects Signals vs. Variables (example)
  • 50. Data Objects Standard Data Types List of some VHDL data types:
  • 51. Data Objects User-Defined Types  VHDL allows you to dene your own data type. A typical example of custom integer type is:  Obviously it is possible to dene more complex data structures.
  • 53. Data Objects Type  The type is defined in the VHDL package and provides a common standard that can be used in VHDL.
  • 54. Finite State Machine (FSM) Design Using VHDL  Finite state machines (FSMs) are mathematical abstractions that are used to solve a large variety of problems, among which are electronic design automation, communication protocol design, parsing and other engineering applications. Block diagram for a Moore-type FSM
  • 55. Finite State Machine (FSM) Design Using VHDL FSM Example
  • 56. Finite State Machine (FSM) Design Using VHDL FSM Example
  • 57. FSM Design Using VHDL FSM Example
  • 58. FSM Design Using VHDL FSM Example
  • 59.
  • 60. FSM Design Using VHDL FSM Example
  • 61. FSM Design Using VHDL FSM Example
  • 62.
  • 63. FSM Design Using VHDL Exercise - traffic light FSM Black box view of the finite state machine Campus map Design this traffic light FSM
  • 64. FSM Design Using VHDL Exercise - traffic light FSM
  • 65.
  • 66.
  • 67. Structural Modeling In VHDL  Structural modeling in VHDL supports hierarchical design concepts. The ability to abstract digital circuits to higher levels is the key to understanding and designing complex digital circuits.  The VHDL structural model supports the reuse of design units. This includes units you have previously designed as well as the ability to use predefined module libraries. Hierarchy design flow example of an MCU MCIP MCU Basic components Configurable components Peripherals Interrupt Controller Address Decoder CPU PLL Reset Module Program Counter Operation Unit Data Address Provider Instruction Decoder Table Read and Write Watchdog Ports Timers MSSPs ALU Multiplier Decoder Instruction Manager Program Memory Data Memory Memory Controllers
  • 68. Structural Modeling In VHDL VHDL Modularity with Components The approach to use a component in VHDL is: 1) Name the module you plan to describe (the entity) and describe what the module will do (the architecture), 2) Let the design tool know the module exists and can be used (component declaration),
  • 69. 3) Declare required internal signals used to connect the design units. Structural Modeling In VHDL VHDL Modularity with Components 4) Use the module in your code (component instantiation, or mapping).
  • 70. Structural Modeling In VHDL VHDL Modularity with Components AND Can be replaced with:
  • 71. Structural Modeling In VHDL Construction of parametrised components (Generics)  Generics allow the component to be customised.  The values assigned to generics in the component instantiation will override any initial values assigned to the generic in the entity statement or component declaration.  Generics can be of any type.
  • 72. Structural Modeling In VHDL Generic Map
  • 73. Structural Modeling In VHDL Generate Statement  The generate statement simplifies description of regular design structures.  Usually it is used to specify a group of identical components using just one component specification and repeating it using the generate mechanism.  A generate statement consists of three main parts: • generation scheme (either for scheme or if scheme); • declarative part (local declarations of subprograms, types, signals, constants, components, attributes, configurations, files and groups); • concurrent statements.
  • 74. Structural Modeling In VHDL Generate Statement - Example
  • 75. Structural Modeling In VHDL Generate Statement – Exercise (generic adder)
  • 76. Looping Constructs  There are two types of loops in VHDL: loops and loops.  Since these two types of loops are both sequential statements, they can only appear inside processes.  If you know the number of iterations the loop requires, you should use a loop.  The loop should be used when you do not know the number of iterations the loop needs to perform.
  • 78. Bibliography Bryan Mealy, Fabrizio Tappero, “Free Range VHDL” 2013. http://freerangefactory.org/pdf/free_range_vhdl.pdf