SlideShare une entreprise Scribd logo
1  sur  15
Lectures on [V]HDL and HDL
Programming on Xilinx
for
Open Educational Resource
on
Logic Development and Programming (EC221)
by
Dr. Piyush Charan
Assistant Professor
Department of Electronics and Communication Engg.
Integral University, Lucknow
What is VHDL??
• [V] HDL
[VHSIC] HDL
[Very High Speed Integrated Circuit]
Hardware Description Language
11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 2
VHDL Introduction
11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 3
VHDL stands for very high-speed integrated circuit hardware description
language. It is a 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
program.
Describing a Design
In VHDL an entity is used to describe a hardware module. An entity can be
described using,
Entity declaration
Architecture
Configuration
Package declaration
Package body
Entity Declaration
11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 4
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 start with ‘entity’ and end with ‘end’ keywords. 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
11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 5
Architecture can be described using structural, dataflow, behavioral or mixed style.
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.
Data Flow Modeling
11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 6
In this modeling style, the flow of data through the entity is expressed using
concurrent (parallel) signal. The concurrent statements in VHDL are WHEN and
GENERATE.
Besides them, assignments using only operators (AND, NOT, +, *, sll, etc.) can also be
used to construct code.
Finally, a special kind of assignment, called BLOCK, can also be employed in this kind
of code.
In concurrent code, the following can be used −
Operators
The WHEN statement (WHEN/ELSE or WITH/SELECT/WHEN);
The GENERATE statement;
The BLOCK statement
Behavioral Modeling
11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 7
In this modeling style, the behavior of an entity as set of statements is executed sequentially in the
specified order. Only statements placed inside a PROCESS, FUNCTION, or PROCEDURE are
sequential.
PROCESSES, FUNCTIONS, and PROCEDURES are the only sections of code that are executed
sequentially.
However, as a whole, any of these blocks is still concurrent with any other statements placed outside it.
One important aspect of behavior code is that it is not limited to sequential logic. Indeed, with it, we
can build sequential circuits as well as combinational circuits.
The behavior statements are IF, WAIT, CASE, and LOOP. VARIABLES are also restricted and they are
supposed to be used in sequential code only. VARIABLE can never be global, so its value cannot be
passed out directly.
Structural Modeling
11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 8
In this modeling, an entity is described as a set of interconnected components. A
component instantiation statement is a concurrent statement. Therefore, the order of these
statements is not important. The structural style of modeling describes only an
interconnection of components (viewed as black boxes), without implying any behavior of
the components themselves nor of the entity that they collectively represent.
In Structural modeling, architecture body is composed of two parts
the declarative part (before the keyword begin), and
the statement part (after the keyword begin).
Logic Operation – AND Gate
11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 9
X Y Z
0 0 0
0 1 0
1 0 0
1 1 1
VHDL Code:
Library ieee;
use ieee.std_logic_1164.all;
entity and1 is
port(x,y:in bit ; z:out bit);
end and1;
architecture virat of and1 is
begin
z<=x and y;
end virat;
Waveforms:
Logic Operation – OR Gate
11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 10
X Y Z
0 0 0
0 1 1
1 0 1
1 1 1
VHDL Code:
Library ieee;
use ieee.std_logic_1164.all;
entity or1 is
port(x,y:in bit ; z:out bit);
end or1;
architecture virat of or1 is
begin
z<=x or y;
end virat;
Waveforms:
Logic Operation – NOT Gate
11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 11
A Q
0 1
1 0
VHDL Code:
Library ieee;
use ieee.std_logic_1164.all;
entity not1 is
port(a:in bit ; q:out bit);
end not1;
architecture virat of not1 is
begin
q<=not a;
end virat;
Waveforms:
Logic Operation – NAND Gate
11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 12
A B C
0 0 1
0 1 1
1 0 1
1 1 0
VHDL Code:
Library ieee;
use ieee.std_logic_1164.all;
entity nand1 is
port(a,b:in bit ; c:out bit);
end nand1;
architecture virat of nand1 is
begin
c<=a nand b;
end virat;
Waveforms:
Logic Operation – NOR Gate
11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 13
A B Y
0 0 1
0 1 0
1 0 0
1 1 0
VHDL Code:
Library ieee;
use ieee.std_logic_1164.all;
entity nor1 is
port(a,b:in bit ; y:out bit);
end nor1;
architecture piyush of nor1 is
begin
y<=a nor b;
end piyush;
Waveforms:
Logic Operation – XOR Gate
11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 14
A B Y
0 0 0
0 1 1
1 0 1
1 1 0
VHDL Code:
Library ieee;
use ieee.std_logic_1164.all;
entity xor1 is
port(a,b:in bit ; y:out bit);
end xor1;
architecture piyush of xor1 is
begin
y<=a xor b;
end piyush;
Waveforms:
Symbol:
Logic Operation – XNOR Gate
11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 15
A B Y
0 0 1
0 1 0
1 0 0
1 1 1
VHDL Code:
Library ieee;
use ieee.std_logic_1164.all;
entity xnor1 is
port(a,b:in bit ; y:out bit);
end xnor1;
architecture piyush of xnor1 is
begin
y<=not(a xor b);
end piyush;
Waveforms:
Symbol:

Contenu connexe

Tendances

Tendances (7)

Commutative Short Circuit Operators
Commutative Short Circuit OperatorsCommutative Short Circuit Operators
Commutative Short Circuit Operators
 
Comparative Analysis of Transformer Based Pre-Trained NLP Models
Comparative Analysis of Transformer Based Pre-Trained NLP ModelsComparative Analysis of Transformer Based Pre-Trained NLP Models
Comparative Analysis of Transformer Based Pre-Trained NLP Models
 
Model Driven Requirements Engineering: Mapping the Field and Beyond
Model Driven Requirements Engineering: Mapping the Field and BeyondModel Driven Requirements Engineering: Mapping the Field and Beyond
Model Driven Requirements Engineering: Mapping the Field and Beyond
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introduction
 
The tao of laravel
The tao of laravelThe tao of laravel
The tao of laravel
 
Flash memory
Flash memoryFlash memory
Flash memory
 
Mini Project- ROM Based Sine Wave Generator
Mini Project- ROM Based Sine Wave GeneratorMini Project- ROM Based Sine Wave Generator
Mini Project- ROM Based Sine Wave Generator
 

Similaire à Unit 4 Hardware Description Languages

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
siddu kadiwal
 

Similaire à Unit 4 Hardware Description Languages (20)

Digital Electronics .
Digital Electronics                                              .Digital Electronics                                              .
Digital Electronics .
 
VHDL-Behavioral-Programs-Structure of VHDL
VHDL-Behavioral-Programs-Structure of VHDLVHDL-Behavioral-Programs-Structure of VHDL
VHDL-Behavioral-Programs-Structure of VHDL
 
Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...
Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...
Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introduction
 
INTRODUCTION TO VHDL
INTRODUCTION    TO    VHDLINTRODUCTION    TO    VHDL
INTRODUCTION TO VHDL
 
Wi Fi documantation
Wi Fi documantationWi Fi documantation
Wi Fi documantation
 
DSD
DSDDSD
DSD
 
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
 
Vhdl
VhdlVhdl
Vhdl
 
Vhdl 1 ppg
Vhdl 1 ppgVhdl 1 ppg
Vhdl 1 ppg
 
opps.pptx
opps.pptxopps.pptx
opps.pptx
 
OVERVIEW OF HARDWARE DESCRIPTION LANGUAGES (HDLs)
OVERVIEW OF HARDWARE DESCRIPTION LANGUAGES (HDLs) OVERVIEW OF HARDWARE DESCRIPTION LANGUAGES (HDLs)
OVERVIEW OF HARDWARE DESCRIPTION LANGUAGES (HDLs)
 
Report on VLSI
Report on VLSIReport on VLSI
Report on VLSI
 
Dica ii chapter slides
Dica ii chapter slidesDica ii chapter slides
Dica ii chapter slides
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 
Introduction to VHDL
Introduction to VHDLIntroduction to VHDL
Introduction to VHDL
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training 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
 
VLSI
VLSIVLSI
VLSI
 
Unit v. HDL Synthesis Process
Unit v. HDL Synthesis ProcessUnit v. HDL Synthesis Process
Unit v. HDL Synthesis Process
 

Plus de Dr Piyush Charan

Plus de Dr Piyush Charan (20)

Unit 1- Intro to Wireless Standards.pdf
Unit 1- Intro to Wireless Standards.pdfUnit 1- Intro to Wireless Standards.pdf
Unit 1- Intro to Wireless Standards.pdf
 
Unit 1 Solar Collectors
Unit 1 Solar CollectorsUnit 1 Solar Collectors
Unit 1 Solar Collectors
 
Unit 5 Quantization
Unit 5 QuantizationUnit 5 Quantization
Unit 5 Quantization
 
Unit 4 Lossy Coding Preliminaries
Unit 4 Lossy Coding PreliminariesUnit 4 Lossy Coding Preliminaries
Unit 4 Lossy Coding Preliminaries
 
Unit 3 Geothermal Energy
Unit 3 Geothermal EnergyUnit 3 Geothermal Energy
Unit 3 Geothermal Energy
 
Unit 2: Programming Language Tools
Unit 2:  Programming Language ToolsUnit 2:  Programming Language Tools
Unit 2: Programming Language Tools
 
Unit 4 Arrays
Unit 4 ArraysUnit 4 Arrays
Unit 4 Arrays
 
Unit 3 Lecture Notes on Programming
Unit 3 Lecture Notes on ProgrammingUnit 3 Lecture Notes on Programming
Unit 3 Lecture Notes on Programming
 
Unit 3 introduction to programming
Unit 3 introduction to programmingUnit 3 introduction to programming
Unit 3 introduction to programming
 
Forensics and wireless body area networks
Forensics and wireless body area networksForensics and wireless body area networks
Forensics and wireless body area networks
 
Final PhD Defense Presentation
Final PhD Defense PresentationFinal PhD Defense Presentation
Final PhD Defense Presentation
 
Unit 3 Arithmetic Coding
Unit 3 Arithmetic CodingUnit 3 Arithmetic Coding
Unit 3 Arithmetic Coding
 
Unit 2 Lecture notes on Huffman coding
Unit 2 Lecture notes on Huffman codingUnit 2 Lecture notes on Huffman coding
Unit 2 Lecture notes on Huffman coding
 
Unit 1 Introduction to Data Compression
Unit 1 Introduction to Data CompressionUnit 1 Introduction to Data Compression
Unit 1 Introduction to Data Compression
 
Unit 3 Dictionary based Compression Techniques
Unit 3 Dictionary based Compression TechniquesUnit 3 Dictionary based Compression Techniques
Unit 3 Dictionary based Compression Techniques
 
Unit 1 Introduction to Non-Conventional Energy Resources
Unit 1 Introduction to Non-Conventional Energy ResourcesUnit 1 Introduction to Non-Conventional Energy Resources
Unit 1 Introduction to Non-Conventional Energy Resources
 
Unit 5-Operational Amplifiers and Electronic Measurement Devices
Unit 5-Operational Amplifiers and Electronic Measurement DevicesUnit 5-Operational Amplifiers and Electronic Measurement Devices
Unit 5-Operational Amplifiers and Electronic Measurement Devices
 
Unit 1 Introduction to Data Compression
Unit 1 Introduction to Data CompressionUnit 1 Introduction to Data Compression
Unit 1 Introduction to Data Compression
 
Unit 4 Switching Theory and Logic Gates
Unit 4 Switching Theory and Logic GatesUnit 4 Switching Theory and Logic Gates
Unit 4 Switching Theory and Logic Gates
 
Unit 1 Numerical Problems on PN Junction Diode
Unit 1 Numerical Problems on PN Junction DiodeUnit 1 Numerical Problems on PN Junction Diode
Unit 1 Numerical Problems on PN Junction Diode
 

Dernier

Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 

Dernier (20)

data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 

Unit 4 Hardware Description Languages

  • 1. Lectures on [V]HDL and HDL Programming on Xilinx for Open Educational Resource on Logic Development and Programming (EC221) by Dr. Piyush Charan Assistant Professor Department of Electronics and Communication Engg. Integral University, Lucknow
  • 2. What is VHDL?? • [V] HDL [VHSIC] HDL [Very High Speed Integrated Circuit] Hardware Description Language 11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 2
  • 3. VHDL Introduction 11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 3 VHDL stands for very high-speed integrated circuit hardware description language. It is a 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 program. Describing a Design In VHDL an entity is used to describe a hardware module. An entity can be described using, Entity declaration Architecture Configuration Package declaration Package body
  • 4. Entity Declaration 11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 4 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 start with ‘entity’ and end with ‘end’ keywords. 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.
  • 5. Architecture 11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 5 Architecture can be described using structural, dataflow, behavioral or mixed style. 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.
  • 6. Data Flow Modeling 11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 6 In this modeling style, the flow of data through the entity is expressed using concurrent (parallel) signal. The concurrent statements in VHDL are WHEN and GENERATE. Besides them, assignments using only operators (AND, NOT, +, *, sll, etc.) can also be used to construct code. Finally, a special kind of assignment, called BLOCK, can also be employed in this kind of code. In concurrent code, the following can be used − Operators The WHEN statement (WHEN/ELSE or WITH/SELECT/WHEN); The GENERATE statement; The BLOCK statement
  • 7. Behavioral Modeling 11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 7 In this modeling style, the behavior of an entity as set of statements is executed sequentially in the specified order. Only statements placed inside a PROCESS, FUNCTION, or PROCEDURE are sequential. PROCESSES, FUNCTIONS, and PROCEDURES are the only sections of code that are executed sequentially. However, as a whole, any of these blocks is still concurrent with any other statements placed outside it. One important aspect of behavior code is that it is not limited to sequential logic. Indeed, with it, we can build sequential circuits as well as combinational circuits. The behavior statements are IF, WAIT, CASE, and LOOP. VARIABLES are also restricted and they are supposed to be used in sequential code only. VARIABLE can never be global, so its value cannot be passed out directly.
  • 8. Structural Modeling 11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 8 In this modeling, an entity is described as a set of interconnected components. A component instantiation statement is a concurrent statement. Therefore, the order of these statements is not important. The structural style of modeling describes only an interconnection of components (viewed as black boxes), without implying any behavior of the components themselves nor of the entity that they collectively represent. In Structural modeling, architecture body is composed of two parts the declarative part (before the keyword begin), and the statement part (after the keyword begin).
  • 9. Logic Operation – AND Gate 11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 9 X Y Z 0 0 0 0 1 0 1 0 0 1 1 1 VHDL Code: Library ieee; use ieee.std_logic_1164.all; entity and1 is port(x,y:in bit ; z:out bit); end and1; architecture virat of and1 is begin z<=x and y; end virat; Waveforms:
  • 10. Logic Operation – OR Gate 11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 10 X Y Z 0 0 0 0 1 1 1 0 1 1 1 1 VHDL Code: Library ieee; use ieee.std_logic_1164.all; entity or1 is port(x,y:in bit ; z:out bit); end or1; architecture virat of or1 is begin z<=x or y; end virat; Waveforms:
  • 11. Logic Operation – NOT Gate 11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 11 A Q 0 1 1 0 VHDL Code: Library ieee; use ieee.std_logic_1164.all; entity not1 is port(a:in bit ; q:out bit); end not1; architecture virat of not1 is begin q<=not a; end virat; Waveforms:
  • 12. Logic Operation – NAND Gate 11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 12 A B C 0 0 1 0 1 1 1 0 1 1 1 0 VHDL Code: Library ieee; use ieee.std_logic_1164.all; entity nand1 is port(a,b:in bit ; c:out bit); end nand1; architecture virat of nand1 is begin c<=a nand b; end virat; Waveforms:
  • 13. Logic Operation – NOR Gate 11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 13 A B Y 0 0 1 0 1 0 1 0 0 1 1 0 VHDL Code: Library ieee; use ieee.std_logic_1164.all; entity nor1 is port(a,b:in bit ; y:out bit); end nor1; architecture piyush of nor1 is begin y<=a nor b; end piyush; Waveforms:
  • 14. Logic Operation – XOR Gate 11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 14 A B Y 0 0 0 0 1 1 1 0 1 1 1 0 VHDL Code: Library ieee; use ieee.std_logic_1164.all; entity xor1 is port(a,b:in bit ; y:out bit); end xor1; architecture piyush of xor1 is begin y<=a xor b; end piyush; Waveforms: Symbol:
  • 15. Logic Operation – XNOR Gate 11/2/2020 Dr. Piyush Charan, Dept. of ECE, Integral University, Lucknow 15 A B Y 0 0 1 0 1 0 1 0 0 1 1 1 VHDL Code: Library ieee; use ieee.std_logic_1164.all; entity xnor1 is port(a,b:in bit ; y:out bit); end xnor1; architecture piyush of xnor1 is begin y<=not(a xor b); end piyush; Waveforms: Symbol: