SlideShare a Scribd company logo
What is VHDL?
VHDL stands for very high-speed integrated circuit hardware description
language. Which is one of the programming language used to model a digital
system by dataflow, behavioral and structural style of modeling. This language was
first introduced in 1981 for the department of Defense (DoD) under the VHSIC
programe. In 1983 IBM, Texas instruments and Intermetrics started to develop this
language. In 1985 VHDL 7.2 version was released. In 1987 IEEE standardized the
language.
Describing a design:
In VHDL an entity is used to describe a hardware module.
An entity can be described using,
1. Entity declaration.
2. Architecture.
3. Configuration
4. Package declaration.
5. Package body.
Entity declaration:It defines the names, input output signals and modes of a
hardware module.
Syntax:
entity entity_name is
Port declaration;
end entity_name;
An entity declaration should starts with ‘entity’ and ends with ‘end’ keywords.
Ports are interfaces through which an entity can communicate with its
environment. Each port must have a name, direction and a type. An entity may
have no port declaration also. The direction will be input, output or inout.
In Port can be read
Out Port can be written
Inout Port can be read and
written
Buffer Port can be read and
written, it
can have only one source.
Architecture:
It describes the internal description of design or it tells what is there inside
design. Each entity has atleast one architecture and an entity can have many
architecture. Architecture can be described using structural, dataflow, behavioral or
mixed style. Architecture can be used to describe a design at different levels of
abstraction like gate level, register transfer level (RTL) or behavior level.
Syntax:
architecture architecture_name of entity_name
architecture_declarative_part;
begin
Statements;
end architecture_name;
Here we should specify the entity name for which we are writing the
architecture body. The architecture statements should be inside the begin and end
keyword. Architecture declarative part may contain variables, constants, or
component declaration.
Configuration:
If an entity contains many architectures and any one of the possible
architecture binding with its entity is done using configuration. It is used to bind
the architecture body to its entity and a component with an entity.
Syntax:
configuration configuration_name of entity_name is
block_configuration;
end configuration_name.
Block_configuration defines the binding of components in a block. This can be
written as
for block_name
component_binding;
end for;
block_name is the name of the architecture body. Component binding binds the
components of the block to entities. This can be written as,
for component_labels:component_name
block_configuration;
end for;
Package declaration:
Package declaration is used to declare components, types, constants, functions
and so on.
Syntax:
package package_name is
Declarations;
end package_name;
Package body:
A package body is used to declare the definitions and procedures that are
declared in corresponding package. Values can be assigned to constants declared in
package in package body.
Syntax:
package body package_name is
Function_procedure definitions;
end package_name;
The internal working of an entity can be defined using different modeling styles
inside architcture body. They are
1. Dataflow modeling.
2. Behavioral modeling.
3. Structural modeling.
Structure of an entity:
Let’s try to understand with the help of one example.
Dataflow modeling:
In this style of modeling, the internal working of an entity can be implemented
using concurrent signal assignment.
Let’s take half adder example which is having one XOR gate and a AND gate.
Library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity ha_en is
port (A,B:in bit;S,C:out bit);
end ha_en;
architecture ha_ar of ha_en is
begin
S<=A xor B;
C<=A and B;
end ha_ar;
Here STD_LOGIC_1164 is an IEEE standard which defines a nine-value logic
type, called STD_ULOGIC. use is a keyword, which imports all the declarations
from this package. The architecture body consists of concurrent signal
assignments, which describes the functionality of the design. Whenever there is a
change in RHS, the expression is evaluated and the value is assigned to LHS.
Behavioral modeling:
In this style of modeling, the internal working of an entity can be implemented
using set of statements.
It contains:
 Process statements
 Sequential statements
 Signal assignment statements
 Wait statements
Process statement is the primary mechanism used to model the behavior of an
entity. It contains sequential statements, variable assignment (:=) statements or
signal assignment (<=) statements etc. It may or may not contain sensitivity list. If
there is an event occurs on any of the signals in the sensitivity list, the statements
within the process is executed.
Inside the process the execution of statements will be sequential and if one entity is
having two processes the execution of these processes will be concurrent. At the
end it waits for another event to occur.
library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity ha_beha_en is
port(
A : in BIT;
B : in BIT;
S : out BIT;
C : out BIT
);
end ha_beha_en;
architecture ha_beha_ar of ha_beha_en is
begin
process_beh:process(A,B)
begin
S<= A xor B;
C<=A and B;
end process process_beh;
end ha_beha_ar;
Here whenever there is a change in the value of a or b the process statements are
executed.
Structural modeling:
The implementation of an entity is done through set of interconnected
components.
It contains:
 Signal declaration.
 Component instances
 Port maps.
 Wait statements.
Component declaration:
Syntax:
component component_name [is]
List_of_interface ports;
end component component_name;
Before instantiating the component it should be declared using component
declaration as shown above. Component declaration declares the name of the entity
and interface of a component.
Let’s try to understand this by taking the example of full adder using 2 half adder
and 1 OR gate.
library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity fa_en is
port(A,B,Cin:in bit; SUM, CARRY:out bit);
end fa_en;
architecture fa_ar of fa_en is
component ha_en
port(A,B:in bit;S,C:out bit);
end component;
signal C1,C2,S1:bit;
begin
HA1:ha_en port map(A,B,S1,C1);
HA2:ha_en port map(S1,Cin,SUM,C2);
CARRY <= C1 or C2;
end fa_ar;
The program we have written for half adder in dataflow modeling is instantiated as
shown above. ha_en is the name of the entity in dataflow modeling. C1, C2, S1 are
the signals used for internal connections of the component which are declared
using the keyword signal. Port map is used to connect different components as well
as connect components to ports of the entity.
Component instantiation is done as follows.
Component_label: component_name port map (signal_list);
Signal_list is the architecture signals which we are connecting to component ports.
This can be done in different ways. What we declared above is positional binding.
One more type is the named binding. The above can be written as,
HA1:ha_en port map(A => A,B => B, S => S1 ,C => C1 );
HA2:ha_en port map(A => S1,B => Cin, S=> SUM, C => C2);
Test bench:
The correctness of the above program can be checked by writing the test bench.
The test bench is used for generating stimulus for the entity under test. Let’s write
a simple test bench for full adder.
library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity tb_en is
end tb_en;
architecture tb_ar of tb_en is
signal a_i,b_i,c_i,sum_i,carry_i:bit;
begin
eut: entity work.fa_en(fa_ar)
port
map(A=>a_i,B=>b_i,Cin=>c_i,SUM=>sum_i,CARRY=>carry_i);
stimulus: process
begin
a_i<='1';b_i<='1';c_i<='1';
wait for 10ns;
a_i<='0';b_i<='1';c_i<='1';
wait for 10ns;
a_i<='1';b_i<='0';c_i<='0';
wait for 10ns;
if now=30ns then
wait;
end if;
end process stimulus;
end tb_ar;
Here now is a predefined function that returns the current simulation time
What we saw upto this is component instantiation by positional and by name. In
this test bench example the entity is directly instantiated. The direct entity
instantiation syntax is:
Component_label: entity entity_name (architecture_name)
port map(signal_list);

More Related Content

What's hot

VHDL Part 4
VHDL Part 4VHDL Part 4
VHDL Part 4
Abhilash Nair
 
VHDL - Enumerated Types (Part 3)
VHDL - Enumerated Types (Part 3)VHDL - Enumerated Types (Part 3)
VHDL - Enumerated Types (Part 3)
Abhilash Nair
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introduction
Dhaval Shukla
 
Introduction to VHDL
Introduction to VHDLIntroduction to VHDL
Basic structures in vhdl
Basic structures in vhdlBasic structures in vhdl
Basic structures in vhdlRaj Mohan
 
Lecture2 vhdl refresher
Lecture2 vhdl refresherLecture2 vhdl refresher
Lecture2 vhdl refresher
Nima Shafiee
 
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
 
Vhdl 1
Vhdl 1Vhdl 1
Vhdl
VhdlVhdl
Vhdl
VhdlVhdl
Vhdl
VhdlVhdl
Hardware Description Language
Hardware Description Language Hardware Description Language
Hardware Description Language
Prachi Pandey
 
Introduction to-vhdl
Introduction to-vhdlIntroduction to-vhdl
Introduction to-vhdl
Neeraj Gupta
 
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x AdditionsVHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
Amal Khailtash
 
Lecture3 combinational blocks
Lecture3 combinational blocksLecture3 combinational blocks
Lecture3 combinational blocks
Nima Shafiee
 
Introduction to VHDL
Introduction to VHDLIntroduction to VHDL
Introduction to VHDL
Mohamed Samy
 
Lecture1
Lecture1Lecture1
Lecture1
karim_ibrahim
 
Short.course.introduction.to.vhdl for beginners
Short.course.introduction.to.vhdl for beginners Short.course.introduction.to.vhdl for beginners
Short.course.introduction.to.vhdl for beginners
Ravi Sony
 

What's hot (20)

VHDL Part 4
VHDL Part 4VHDL Part 4
VHDL Part 4
 
VHDL - Enumerated Types (Part 3)
VHDL - Enumerated Types (Part 3)VHDL - Enumerated Types (Part 3)
VHDL - Enumerated Types (Part 3)
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introduction
 
Introduction to VHDL
Introduction to VHDLIntroduction to VHDL
Introduction to VHDL
 
Basic structures in vhdl
Basic structures in vhdlBasic structures in vhdl
Basic structures in vhdl
 
Lecture2 vhdl refresher
Lecture2 vhdl refresherLecture2 vhdl refresher
Lecture2 vhdl refresher
 
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...
 
Vhdl 1
Vhdl 1Vhdl 1
Vhdl 1
 
Vhdl 1 ppg
Vhdl 1 ppgVhdl 1 ppg
Vhdl 1 ppg
 
Vhdl
VhdlVhdl
Vhdl
 
Vhdl
VhdlVhdl
Vhdl
 
Vhdl
VhdlVhdl
Vhdl
 
Hardware Description Language
Hardware Description Language Hardware Description Language
Hardware Description Language
 
Introduction to-vhdl
Introduction to-vhdlIntroduction to-vhdl
Introduction to-vhdl
 
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x AdditionsVHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
 
Lecture3 combinational blocks
Lecture3 combinational blocksLecture3 combinational blocks
Lecture3 combinational blocks
 
Introduction to VHDL
Introduction to VHDLIntroduction to VHDL
Introduction to VHDL
 
Lecture1
Lecture1Lecture1
Lecture1
 
Basics of Vhdl
Basics of VhdlBasics of Vhdl
Basics of Vhdl
 
Short.course.introduction.to.vhdl for beginners
Short.course.introduction.to.vhdl for beginners Short.course.introduction.to.vhdl for beginners
Short.course.introduction.to.vhdl for beginners
 

Viewers also liked

Flip flo ps
Flip flo psFlip flo ps
Design & implementation of high speed carry select adder
Design & implementation of high speed carry select adderDesign & implementation of high speed carry select adder
Design & implementation of high speed carry select adder
ssingh7603
 
Mealy moore machine model
Mealy moore machine modelMealy moore machine model
Mealy moore machine model
deepinderbedi
 
Mealy and moore machines
Mealy and moore machinesMealy and moore machines
Mealy and moore machines
grahamwell
 
Moore and Mealy machines
Moore and Mealy machinesMoore and Mealy machines
Moore and Mealy machinesIrfan Anjum
 
Behavioral modelling in VHDL
Behavioral modelling in VHDLBehavioral modelling in VHDL
Behavioral modelling in VHDL
Bhupendra Pratap Singh
 
UNIT-I DIGITAL SYSTEM DESIGN
UNIT-I DIGITAL SYSTEM DESIGN UNIT-I DIGITAL SYSTEM DESIGN
UNIT-I DIGITAL SYSTEM DESIGN
Dr.YNM
 
ALGORITHMIC STATE MACHINES
ALGORITHMIC STATE MACHINESALGORITHMIC STATE MACHINES
ALGORITHMIC STATE MACHINES
Rabindranath Tagore University, Bhopal
 
Computer Aided Design
Computer Aided DesignComputer Aided Design
Computer Aided Design
illpa
 
CAD presentation
CAD presentationCAD presentation

Viewers also liked (12)

Flip flo ps
Flip flo psFlip flo ps
Flip flo ps
 
Carry save adder vhdl
Carry save adder vhdlCarry save adder vhdl
Carry save adder vhdl
 
Design & implementation of high speed carry select adder
Design & implementation of high speed carry select adderDesign & implementation of high speed carry select adder
Design & implementation of high speed carry select adder
 
Mealy moore machine model
Mealy moore machine modelMealy moore machine model
Mealy moore machine model
 
Mealy and moore machines
Mealy and moore machinesMealy and moore machines
Mealy and moore machines
 
Moore and Mealy machines
Moore and Mealy machinesMoore and Mealy machines
Moore and Mealy machines
 
Behavioral modelling in VHDL
Behavioral modelling in VHDLBehavioral modelling in VHDL
Behavioral modelling in VHDL
 
Verilog hdl
Verilog hdlVerilog hdl
Verilog hdl
 
UNIT-I DIGITAL SYSTEM DESIGN
UNIT-I DIGITAL SYSTEM DESIGN UNIT-I DIGITAL SYSTEM DESIGN
UNIT-I DIGITAL SYSTEM DESIGN
 
ALGORITHMIC STATE MACHINES
ALGORITHMIC STATE MACHINESALGORITHMIC STATE MACHINES
ALGORITHMIC STATE MACHINES
 
Computer Aided Design
Computer Aided DesignComputer Aided Design
Computer Aided Design
 
CAD presentation
CAD presentationCAD presentation
CAD presentation
 

Similar to INTRODUCTION TO VHDL

Basic Coding In VHDL COding
Basic Coding In VHDL COdingBasic Coding In VHDL COding
Basic Coding In VHDL COding
anna university
 
DSD
DSDDSD
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
iconicyt2
 
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptxIIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
rajkumar490591
 
Unit 2 CMath behind coding.pptx
Unit 2 CMath behind coding.pptxUnit 2 CMath behind coding.pptx
Unit 2 CMath behind coding.pptx
PragatheshP
 
C Programming Unit-1
C Programming Unit-1C Programming Unit-1
C Programming Unit-1
Vikram Nandini
 
Introduction to C Language - Version 1.0 by Mark John Lado
Introduction to C Language - Version 1.0 by Mark John LadoIntroduction to C Language - Version 1.0 by Mark John Lado
Introduction to C Language - Version 1.0 by Mark John Lado
Mark John Lado, MIT
 
VHDL lecture 1.ppt
VHDL lecture 1.pptVHDL lecture 1.ppt
VHDL lecture 1.ppt
seemasylvester
 
ece223-vhdl-lab1-w07.ppt
ece223-vhdl-lab1-w07.pptece223-vhdl-lab1-w07.ppt
ece223-vhdl-lab1-w07.ppt
MukulKumar972668
 
ece223-vhdl-lab1-w07.ppt
ece223-vhdl-lab1-w07.pptece223-vhdl-lab1-w07.ppt
ece223-vhdl-lab1-w07.ppt
MukulKumar972668
 
Unit 2 introduction to c programming
Unit 2   introduction to c programmingUnit 2   introduction to c programming
Unit 2 introduction to c programming
Mithun DSouza
 
Chapter 01
Chapter 01Chapter 01
Chapter 01
Amirul Islam
 
Password protected diary
Password protected diaryPassword protected diary
Password protected diary
SHARDA SHARAN
 
unit 1 cpds.pptx
unit 1 cpds.pptxunit 1 cpds.pptx
unit 1 cpds.pptx
madhurij54
 

Similar to INTRODUCTION TO VHDL (20)

Basic Coding In VHDL COding
Basic Coding In VHDL COdingBasic Coding In VHDL COding
Basic Coding In VHDL COding
 
Hd6
Hd6Hd6
Hd6
 
DSD
DSDDSD
DSD
 
Vhdl
VhdlVhdl
Vhdl
 
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
 
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptxIIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
 
Unit 2 CMath behind coding.pptx
Unit 2 CMath behind coding.pptxUnit 2 CMath behind coding.pptx
Unit 2 CMath behind coding.pptx
 
Pc module1
Pc module1Pc module1
Pc module1
 
C Programming Unit-1
C Programming Unit-1C Programming Unit-1
C Programming Unit-1
 
Introduction to C Language - Version 1.0 by Mark John Lado
Introduction to C Language - Version 1.0 by Mark John LadoIntroduction to C Language - Version 1.0 by Mark John Lado
Introduction to C Language - Version 1.0 by Mark John Lado
 
VHDL lecture 1.ppt
VHDL lecture 1.pptVHDL lecture 1.ppt
VHDL lecture 1.ppt
 
ece223-vhdl-lab1-w07.ppt
ece223-vhdl-lab1-w07.pptece223-vhdl-lab1-w07.ppt
ece223-vhdl-lab1-w07.ppt
 
ece223-vhdl-lab1-w07.ppt
ece223-vhdl-lab1-w07.pptece223-vhdl-lab1-w07.ppt
ece223-vhdl-lab1-w07.ppt
 
Wi Fi documantation
Wi Fi documantationWi Fi documantation
Wi Fi documantation
 
Unit 2 introduction to c programming
Unit 2   introduction to c programmingUnit 2   introduction to c programming
Unit 2 introduction to c programming
 
python and perl
python and perlpython and perl
python and perl
 
Chapter 01
Chapter 01Chapter 01
Chapter 01
 
Password protected diary
Password protected diaryPassword protected diary
Password protected diary
 
Technical Interview
Technical InterviewTechnical Interview
Technical Interview
 
unit 1 cpds.pptx
unit 1 cpds.pptxunit 1 cpds.pptx
unit 1 cpds.pptx
 

Recently uploaded

Observation of Io’s Resurfacing via Plume Deposition Using Ground-based Adapt...
Observation of Io’s Resurfacing via Plume Deposition Using Ground-based Adapt...Observation of Io’s Resurfacing via Plume Deposition Using Ground-based Adapt...
Observation of Io’s Resurfacing via Plume Deposition Using Ground-based Adapt...
Sérgio Sacani
 
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Sérgio Sacani
 
extra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdfextra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdf
DiyaBiswas10
 
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
Health Advances
 
platelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptxplatelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptx
muralinath2
 
Unveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdfUnveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdf
Erdal Coalmaker
 
GBSN - Biochemistry (Unit 5) Chemistry of Lipids
GBSN - Biochemistry (Unit 5) Chemistry of LipidsGBSN - Biochemistry (Unit 5) Chemistry of Lipids
GBSN - Biochemistry (Unit 5) Chemistry of Lipids
Areesha Ahmad
 
platelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptxplatelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptx
muralinath2
 
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATIONPRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
ChetanK57
 
Nutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technologyNutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technology
Lokesh Patil
 
Lateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensiveLateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensive
silvermistyshot
 
Hemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptxHemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptx
muralinath2
 
EY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptxEY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptx
AlguinaldoKong
 
Richard's entangled aventures in wonderland
Richard's entangled aventures in wonderlandRichard's entangled aventures in wonderland
Richard's entangled aventures in wonderland
Richard Gill
 
NuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final versionNuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final version
pablovgd
 
Leaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdfLeaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdf
RenuJangid3
 
GBSN - Microbiology (Lab 4) Culture Media
GBSN - Microbiology (Lab 4) Culture MediaGBSN - Microbiology (Lab 4) Culture Media
GBSN - Microbiology (Lab 4) Culture Media
Areesha Ahmad
 
ESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptxESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptx
muralinath2
 
4. An Overview of Sugarcane White Leaf Disease in Vietnam.pdf
4. An Overview of Sugarcane White Leaf Disease in Vietnam.pdf4. An Overview of Sugarcane White Leaf Disease in Vietnam.pdf
4. An Overview of Sugarcane White Leaf Disease in Vietnam.pdf
ssuserbfdca9
 
Cancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate PathwayCancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate Pathway
AADYARAJPANDEY1
 

Recently uploaded (20)

Observation of Io’s Resurfacing via Plume Deposition Using Ground-based Adapt...
Observation of Io’s Resurfacing via Plume Deposition Using Ground-based Adapt...Observation of Io’s Resurfacing via Plume Deposition Using Ground-based Adapt...
Observation of Io’s Resurfacing via Plume Deposition Using Ground-based Adapt...
 
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
 
extra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdfextra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdf
 
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
 
platelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptxplatelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptx
 
Unveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdfUnveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdf
 
GBSN - Biochemistry (Unit 5) Chemistry of Lipids
GBSN - Biochemistry (Unit 5) Chemistry of LipidsGBSN - Biochemistry (Unit 5) Chemistry of Lipids
GBSN - Biochemistry (Unit 5) Chemistry of Lipids
 
platelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptxplatelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptx
 
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATIONPRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
 
Nutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technologyNutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technology
 
Lateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensiveLateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensive
 
Hemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptxHemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptx
 
EY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptxEY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptx
 
Richard's entangled aventures in wonderland
Richard's entangled aventures in wonderlandRichard's entangled aventures in wonderland
Richard's entangled aventures in wonderland
 
NuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final versionNuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final version
 
Leaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdfLeaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdf
 
GBSN - Microbiology (Lab 4) Culture Media
GBSN - Microbiology (Lab 4) Culture MediaGBSN - Microbiology (Lab 4) Culture Media
GBSN - Microbiology (Lab 4) Culture Media
 
ESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptxESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptx
 
4. An Overview of Sugarcane White Leaf Disease in Vietnam.pdf
4. An Overview of Sugarcane White Leaf Disease in Vietnam.pdf4. An Overview of Sugarcane White Leaf Disease in Vietnam.pdf
4. An Overview of Sugarcane White Leaf Disease in Vietnam.pdf
 
Cancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate PathwayCancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate Pathway
 

INTRODUCTION TO VHDL

  • 1. What is VHDL? VHDL stands for very high-speed integrated circuit hardware description language. Which is one of the programming language used to model a digital system by dataflow, behavioral and structural style of modeling. This language was first introduced in 1981 for the department of Defense (DoD) under the VHSIC programe. In 1983 IBM, Texas instruments and Intermetrics started to develop this language. In 1985 VHDL 7.2 version was released. In 1987 IEEE standardized the language. Describing a design: In VHDL an entity is used to describe a hardware module. An entity can be described using, 1. Entity declaration. 2. Architecture. 3. Configuration 4. Package declaration. 5. Package body. Entity declaration:It defines the names, input output signals and modes of a hardware module. Syntax: entity entity_name is Port declaration; end entity_name; An entity declaration should starts with ‘entity’ and ends with ‘end’ keywords.
  • 2. Ports are interfaces through which an entity can communicate with its environment. Each port must have a name, direction and a type. An entity may have no port declaration also. The direction will be input, output or inout. In Port can be read Out Port can be written Inout Port can be read and written Buffer Port can be read and written, it can have only one source. Architecture: It describes the internal description of design or it tells what is there inside design. Each entity has atleast one architecture and an entity can have many architecture. Architecture can be described using structural, dataflow, behavioral or mixed style. Architecture can be used to describe a design at different levels of abstraction like gate level, register transfer level (RTL) or behavior level. Syntax: architecture architecture_name of entity_name architecture_declarative_part; begin Statements; end architecture_name; Here we should specify the entity name for which we are writing the architecture body. The architecture statements should be inside the begin and end keyword. Architecture declarative part may contain variables, constants, or component declaration.
  • 3. Configuration: If an entity contains many architectures and any one of the possible architecture binding with its entity is done using configuration. It is used to bind the architecture body to its entity and a component with an entity. Syntax: configuration configuration_name of entity_name is block_configuration; end configuration_name. Block_configuration defines the binding of components in a block. This can be written as for block_name component_binding; end for; block_name is the name of the architecture body. Component binding binds the components of the block to entities. This can be written as, for component_labels:component_name block_configuration; end for; Package declaration: Package declaration is used to declare components, types, constants, functions and so on. Syntax: package package_name is Declarations; end package_name;
  • 4. Package body: A package body is used to declare the definitions and procedures that are declared in corresponding package. Values can be assigned to constants declared in package in package body. Syntax: package body package_name is Function_procedure definitions; end package_name; The internal working of an entity can be defined using different modeling styles inside architcture body. They are 1. Dataflow modeling. 2. Behavioral modeling. 3. Structural modeling. Structure of an entity: Let’s try to understand with the help of one example.
  • 5. Dataflow modeling: In this style of modeling, the internal working of an entity can be implemented using concurrent signal assignment. Let’s take half adder example which is having one XOR gate and a AND gate. Library IEEE; use IEEE.STD_LOGIC_1164.all; entity ha_en is port (A,B:in bit;S,C:out bit); end ha_en; architecture ha_ar of ha_en is begin S<=A xor B; C<=A and B; end ha_ar; Here STD_LOGIC_1164 is an IEEE standard which defines a nine-value logic type, called STD_ULOGIC. use is a keyword, which imports all the declarations from this package. The architecture body consists of concurrent signal assignments, which describes the functionality of the design. Whenever there is a change in RHS, the expression is evaluated and the value is assigned to LHS.
  • 6. Behavioral modeling: In this style of modeling, the internal working of an entity can be implemented using set of statements. It contains:  Process statements  Sequential statements  Signal assignment statements  Wait statements Process statement is the primary mechanism used to model the behavior of an entity. It contains sequential statements, variable assignment (:=) statements or signal assignment (<=) statements etc. It may or may not contain sensitivity list. If there is an event occurs on any of the signals in the sensitivity list, the statements within the process is executed. Inside the process the execution of statements will be sequential and if one entity is having two processes the execution of these processes will be concurrent. At the end it waits for another event to occur. library IEEE; use IEEE.STD_LOGIC_1164.all; entity ha_beha_en is port( A : in BIT; B : in BIT; S : out BIT; C : out BIT ); end ha_beha_en;
  • 7. architecture ha_beha_ar of ha_beha_en is begin process_beh:process(A,B) begin S<= A xor B; C<=A and B; end process process_beh; end ha_beha_ar; Here whenever there is a change in the value of a or b the process statements are executed. Structural modeling: The implementation of an entity is done through set of interconnected components. It contains:  Signal declaration.  Component instances  Port maps.  Wait statements. Component declaration: Syntax: component component_name [is] List_of_interface ports; end component component_name; Before instantiating the component it should be declared using component declaration as shown above. Component declaration declares the name of the entity and interface of a component.
  • 8. Let’s try to understand this by taking the example of full adder using 2 half adder and 1 OR gate. library IEEE; use IEEE.STD_LOGIC_1164.all; entity fa_en is port(A,B,Cin:in bit; SUM, CARRY:out bit); end fa_en; architecture fa_ar of fa_en is component ha_en port(A,B:in bit;S,C:out bit); end component; signal C1,C2,S1:bit; begin HA1:ha_en port map(A,B,S1,C1); HA2:ha_en port map(S1,Cin,SUM,C2); CARRY <= C1 or C2;
  • 9. end fa_ar; The program we have written for half adder in dataflow modeling is instantiated as shown above. ha_en is the name of the entity in dataflow modeling. C1, C2, S1 are the signals used for internal connections of the component which are declared using the keyword signal. Port map is used to connect different components as well as connect components to ports of the entity. Component instantiation is done as follows. Component_label: component_name port map (signal_list); Signal_list is the architecture signals which we are connecting to component ports. This can be done in different ways. What we declared above is positional binding. One more type is the named binding. The above can be written as, HA1:ha_en port map(A => A,B => B, S => S1 ,C => C1 ); HA2:ha_en port map(A => S1,B => Cin, S=> SUM, C => C2); Test bench: The correctness of the above program can be checked by writing the test bench. The test bench is used for generating stimulus for the entity under test. Let’s write a simple test bench for full adder. library IEEE; use IEEE.STD_LOGIC_1164.all; entity tb_en is end tb_en; architecture tb_ar of tb_en is signal a_i,b_i,c_i,sum_i,carry_i:bit;
  • 10. begin eut: entity work.fa_en(fa_ar) port map(A=>a_i,B=>b_i,Cin=>c_i,SUM=>sum_i,CARRY=>carry_i); stimulus: process begin a_i<='1';b_i<='1';c_i<='1'; wait for 10ns; a_i<='0';b_i<='1';c_i<='1'; wait for 10ns; a_i<='1';b_i<='0';c_i<='0'; wait for 10ns; if now=30ns then wait; end if; end process stimulus; end tb_ar; Here now is a predefined function that returns the current simulation time What we saw upto this is component instantiation by positional and by name. In this test bench example the entity is directly instantiated. The direct entity instantiation syntax is: Component_label: entity entity_name (architecture_name) port map(signal_list);