SlideShare a Scribd company logo
VHDL IDENTIFIERS, SIGNALS, & ATTRIBUTES
Dr.R.P.Rao
Identifier (naming) rules:
Can consist of alphabet characters, numbers, and underscore
First character must be a letter (alphabet)
Last character cannot be an underscore
Consecutive underscores are not allowed
Upper and lower case are equivalent (case insensitive)
VHDL keywords cannot be used as identifiers
ReservedKeywords:
abs downto library postponed srl
access else linkage procedure subtype
after elsif literal process then
alias end loop pure to
all entity map range transport
and exit mod record type
architecture file nand register unaffected
array for new reject units
assert function next rem until
attribute generate nor report use
begin generic not return variable
block group null rol wait
body guarded of ror when
buffer if on select while
bus impure open severity with
case in or signal xnor
component inertial others shared xor
configuration inout out sla
constant is package sll
disconnect label port sra
Data Types for ports and signals
BIT and BIT_VECTOR:
BIT_VECTOR is an array of BITs
Can have values: 0 1 Note: 0 is initialization value (first value is initial value)
STD_LOGIC and STD_LOGIC_VECTOR:
STD_LOGIC_VECTOR is and array ofSTD_LOGICs
Can have values: U undefined logic value
X forcing unknown (not don’t care)
0
1
Z high impedance (tri-state)
W weak unknown
L weak 0
H weak 1
- don’t care
Note: U is initialization value (first value is initial value)
VHDL IDENTIFIERS, SIGNALS, & ATTRIBUTES
Dr.R.P.Rao
To use STD_LOGIC and STD_LOGIC_VECTOR, include the following at beginning model:
library IEEE;
use IEEE.std_logic_1164.all;
Some other commonly used IEEE library packages include:
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;
These packages allow bit vector arithmetic – very useful for counters, etc.
example: COUNT <= COUNT + 1; -- increments COUNT value
Signals represent wires or outputs of gates, FFs, etc. Ports (ins, outs, inouts) in the entity are
signals. Internal signals are often needed in complex models and are declared in the
architecture description as follows:
architecture architecture_name of entity_name is
signal signal_name: type;
: : :
signal signal_name: type;
begin
:
end architecture architecture_name;
The signal type can be bit, bit_vector, std_logic, or std_logic_vector
Signals can be initialized to a beginning value at the declaration BUT this is meaningless to
synthesis tools since no hardware mechanism exists to produce this “power-up” init value
Example: signal COUNT: bit_vector(3 downto 0) := “0101”;
here := means immediate assignment and used to indicate an initial value
but the normal assignment operator is <=
Example: COUNT <= “0101”;
this does correspond to synthesizable logic and will be recognized by tools
Attributes provide information about items such as signals. The most important signal attribute
is ‘event which yields a Boolean value of true if an event has just occurred on the signal
to which the attribute is applied an event on a signal means a change in value
signal’event allows us to condition on a transition for FFs
Example:
entity DFF is
port (CK, D: in bit;
Q: out bit);
end entity DFF;
architecture AUFB of DFF is
begin
process (CK) begin
if (CK’event and CK=’1’) then Q <= D; -- occurs only on the rising edge of CK
end if;
end process;
end architecture AUFB;

More Related Content

What's hot

Introduction to objects and inputoutput
Introduction to objects and inputoutput Introduction to objects and inputoutput
Introduction to objects and inputoutput
Ahmad Idrees
 
Framework Design Guidelines
Framework Design GuidelinesFramework Design Guidelines
Framework Design Guidelines
Mohamed Meligy
 
12pointerin c#
12pointerin c#12pointerin c#
12pointerin c#
Sireesh K
 
Type checking compiler construction Chapter #6
Type checking compiler construction Chapter #6Type checking compiler construction Chapter #6
Type checking compiler construction Chapter #6
Daniyal Mughal
 
Lecture02 java
Lecture02 javaLecture02 java
Lecture02 java
jawidAhmadRohani
 
L attribute in compiler design
L  attribute in compiler designL  attribute in compiler design
L attribute in compiler design
khush_boo31
 
Java scanner, everything you need to know about Java Scanner
Java scanner, everything you need to know about Java ScannerJava scanner, everything you need to know about Java Scanner
Java scanner, everything you need to know about Java Scanner
Edward Nyang'ali
 
Storage Class Specifiers in C++
Storage Class Specifiers in C++Storage Class Specifiers in C++
Storage Class Specifiers in C++
Reddhi Basu
 
Review of c_sharp2_features_part_iii
Review of c_sharp2_features_part_iiiReview of c_sharp2_features_part_iii
Review of c_sharp2_features_part_iii
Nico Ludwig
 
Compiler Construction | Lecture 7 | Type Checking
Compiler Construction | Lecture 7 | Type CheckingCompiler Construction | Lecture 7 | Type Checking
Compiler Construction | Lecture 7 | Type Checking
Eelco Visser
 
Basic
BasicBasic
Ch7 Basic Types
Ch7 Basic TypesCh7 Basic Types
Ch7 Basic Types
SzeChingChen
 
Storage classes in C
Storage classes in CStorage classes in C
Storage classes in C
Nitesh Bichwani
 
JavaScript: Core Part
JavaScript: Core PartJavaScript: Core Part
JavaScript: Core Part
維佋 唐
 
Python syntax
Python syntaxPython syntax
Python syntax
Learnbay Datascience
 
Type Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLikeType Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLike
United International University
 
Storage class
Storage classStorage class
Storage class
Joy Forerver
 

What's hot (19)

Introduction to objects and inputoutput
Introduction to objects and inputoutput Introduction to objects and inputoutput
Introduction to objects and inputoutput
 
Framework Design Guidelines
Framework Design GuidelinesFramework Design Guidelines
Framework Design Guidelines
 
12pointerin c#
12pointerin c#12pointerin c#
12pointerin c#
 
Type checking compiler construction Chapter #6
Type checking compiler construction Chapter #6Type checking compiler construction Chapter #6
Type checking compiler construction Chapter #6
 
Lecture02 java
Lecture02 javaLecture02 java
Lecture02 java
 
L attribute in compiler design
L  attribute in compiler designL  attribute in compiler design
L attribute in compiler design
 
Java scanner, everything you need to know about Java Scanner
Java scanner, everything you need to know about Java ScannerJava scanner, everything you need to know about Java Scanner
Java scanner, everything you need to know about Java Scanner
 
Storage Class Specifiers in C++
Storage Class Specifiers in C++Storage Class Specifiers in C++
Storage Class Specifiers in C++
 
Review of c_sharp2_features_part_iii
Review of c_sharp2_features_part_iiiReview of c_sharp2_features_part_iii
Review of c_sharp2_features_part_iii
 
Compiler Construction | Lecture 7 | Type Checking
Compiler Construction | Lecture 7 | Type CheckingCompiler Construction | Lecture 7 | Type Checking
Compiler Construction | Lecture 7 | Type Checking
 
Basic
BasicBasic
Basic
 
Ch7 Basic Types
Ch7 Basic TypesCh7 Basic Types
Ch7 Basic Types
 
Pc module1
Pc module1Pc module1
Pc module1
 
Storage classes in C
Storage classes in CStorage classes in C
Storage classes in C
 
JavaScript: Core Part
JavaScript: Core PartJavaScript: Core Part
JavaScript: Core Part
 
Template classes and ROS messages
Template classes and ROS messagesTemplate classes and ROS messages
Template classes and ROS messages
 
Python syntax
Python syntaxPython syntax
Python syntax
 
Type Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLikeType Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLike
 
Storage class
Storage classStorage class
Storage class
 

Similar to Hd3

vhdl
vhdlvhdl
the-vhsic-.pptx
the-vhsic-.pptxthe-vhsic-.pptx
the-vhsic-.pptx
jpradha86
 
VHDL - Part 2
VHDL - Part 2VHDL - Part 2
VHDL - Part 2
Abhilash Nair
 
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
 
VHDL
VHDLVHDL
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
 
Cpprm
CpprmCpprm
Cpprm
Shawne Lee
 
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
 
Basic Coding In VHDL COding
Basic Coding In VHDL COdingBasic Coding In VHDL COding
Basic Coding In VHDL COding
anna university
 
Verilog Final Probe'22.pptx
Verilog Final Probe'22.pptxVerilog Final Probe'22.pptx
Verilog Final Probe'22.pptx
SyedAzim6
 
Getting Started with C++
Getting Started with C++Getting Started with C++
Getting Started with C++
Praveen M Jigajinni
 
INTRODUCTION TO VHDL
INTRODUCTION    TO    VHDLINTRODUCTION    TO    VHDL
INTRODUCTION TO VHDL
karthikpunuru
 
Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#
SAMIR BHOGAYTA
 
Ansi
AnsiAnsi

Similar to Hd3 (20)

Vhdl
VhdlVhdl
Vhdl
 
vhdl
vhdlvhdl
vhdl
 
the-vhsic-.pptx
the-vhsic-.pptxthe-vhsic-.pptx
the-vhsic-.pptx
 
VHDL - Part 2
VHDL - Part 2VHDL - Part 2
VHDL - Part 2
 
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
 
Spdas2 vlsibput
Spdas2 vlsibputSpdas2 vlsibput
Spdas2 vlsibput
 
VHDL
VHDLVHDL
VHDL
 
Hd6
Hd6Hd6
Hd6
 
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
 
Cpprm
CpprmCpprm
Cpprm
 
Hd2
Hd2Hd2
Hd2
 
OVERVIEW OF HARDWARE DESCRIPTION LANGUAGES (HDLs)
OVERVIEW OF HARDWARE DESCRIPTION LANGUAGES (HDLs) OVERVIEW OF HARDWARE DESCRIPTION LANGUAGES (HDLs)
OVERVIEW OF HARDWARE DESCRIPTION LANGUAGES (HDLs)
 
python and perl
python and perlpython and perl
python and perl
 
Basic Coding In VHDL COding
Basic Coding In VHDL COdingBasic Coding In VHDL COding
Basic Coding In VHDL COding
 
Verilog Final Probe'22.pptx
Verilog Final Probe'22.pptxVerilog Final Probe'22.pptx
Verilog Final Probe'22.pptx
 
Getting Started with C++
Getting Started with C++Getting Started with C++
Getting Started with C++
 
INTRODUCTION TO VHDL
INTRODUCTION    TO    VHDLINTRODUCTION    TO    VHDL
INTRODUCTION TO VHDL
 
Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#
 
Ansi
AnsiAnsi
Ansi
 

More from Prakash Rao

PAL
PALPAL
Digital Signal Processing by Dr. R. Prakash Rao
Digital Signal Processing by Dr. R. Prakash Rao Digital Signal Processing by Dr. R. Prakash Rao
Digital Signal Processing by Dr. R. Prakash Rao
Prakash Rao
 
Electromagnetic Theory and Transmission Lines by Dr. R. Prakash Rao
Electromagnetic Theory and Transmission Lines  by Dr. R. Prakash RaoElectromagnetic Theory and Transmission Lines  by Dr. R. Prakash Rao
Electromagnetic Theory and Transmission Lines by Dr. R. Prakash Rao
Prakash Rao
 
VLSI15
VLSI15VLSI15
VLSI15
Prakash Rao
 
VLSI14
VLSI14VLSI14
VLSI14
Prakash Rao
 
VLSI13
VLSI13VLSI13
VLSI13
Prakash Rao
 
VLSI12
VLSI12VLSI12
VLSI12
Prakash Rao
 
VLSI11
VLSI11VLSI11
VLSI11
Prakash Rao
 
VLSI9
VLSI9VLSI9
VLSI8
VLSI8VLSI8
VLSI7
VLSI7VLSI7
VLSI6
VLSI6VLSI6
VLSI5
VLSI5VLSI5
VLSI4
VLSI4VLSI4
VLSI3
VLSI3VLSI3
VLSI2
VLSI2VLSI2
VLSI DESIGN
VLSI DESIGN VLSI DESIGN
VLSI DESIGN
Prakash Rao
 
VLSI10
VLSI10VLSI10
VLSI10
Prakash Rao
 
BIASING OF BJT
BIASING OF BJT BIASING OF BJT
BIASING OF BJT
Prakash Rao
 

More from Prakash Rao (20)

PAL
PALPAL
PAL
 
Digital Signal Processing by Dr. R. Prakash Rao
Digital Signal Processing by Dr. R. Prakash Rao Digital Signal Processing by Dr. R. Prakash Rao
Digital Signal Processing by Dr. R. Prakash Rao
 
Electromagnetic Theory and Transmission Lines by Dr. R. Prakash Rao
Electromagnetic Theory and Transmission Lines  by Dr. R. Prakash RaoElectromagnetic Theory and Transmission Lines  by Dr. R. Prakash Rao
Electromagnetic Theory and Transmission Lines by Dr. R. Prakash Rao
 
VLSI15
VLSI15VLSI15
VLSI15
 
VLSI14
VLSI14VLSI14
VLSI14
 
VLSI13
VLSI13VLSI13
VLSI13
 
VLSI12
VLSI12VLSI12
VLSI12
 
VLSI11
VLSI11VLSI11
VLSI11
 
VLSI9
VLSI9VLSI9
VLSI9
 
VLSI8
VLSI8VLSI8
VLSI8
 
VLSI7
VLSI7VLSI7
VLSI7
 
VLSI6
VLSI6VLSI6
VLSI6
 
VLSI5
VLSI5VLSI5
VLSI5
 
VLSI4
VLSI4VLSI4
VLSI4
 
VLSI3
VLSI3VLSI3
VLSI3
 
VLSI2
VLSI2VLSI2
VLSI2
 
VLSI DESIGN
VLSI DESIGN VLSI DESIGN
VLSI DESIGN
 
VLSI10
VLSI10VLSI10
VLSI10
 
Fet
FetFet
Fet
 
BIASING OF BJT
BIASING OF BJT BIASING OF BJT
BIASING OF BJT
 

Recently uploaded

一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
Kamal Acharya
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
Kamal Acharya
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 

Recently uploaded (20)

一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 

Hd3

  • 1. VHDL IDENTIFIERS, SIGNALS, & ATTRIBUTES Dr.R.P.Rao Identifier (naming) rules: Can consist of alphabet characters, numbers, and underscore First character must be a letter (alphabet) Last character cannot be an underscore Consecutive underscores are not allowed Upper and lower case are equivalent (case insensitive) VHDL keywords cannot be used as identifiers ReservedKeywords: abs downto library postponed srl access else linkage procedure subtype after elsif literal process then alias end loop pure to all entity map range transport and exit mod record type architecture file nand register unaffected array for new reject units assert function next rem until attribute generate nor report use begin generic not return variable block group null rol wait body guarded of ror when buffer if on select while bus impure open severity with case in or signal xnor component inertial others shared xor configuration inout out sla constant is package sll disconnect label port sra Data Types for ports and signals BIT and BIT_VECTOR: BIT_VECTOR is an array of BITs Can have values: 0 1 Note: 0 is initialization value (first value is initial value) STD_LOGIC and STD_LOGIC_VECTOR: STD_LOGIC_VECTOR is and array ofSTD_LOGICs Can have values: U undefined logic value X forcing unknown (not don’t care) 0 1 Z high impedance (tri-state) W weak unknown L weak 0 H weak 1 - don’t care Note: U is initialization value (first value is initial value)
  • 2. VHDL IDENTIFIERS, SIGNALS, & ATTRIBUTES Dr.R.P.Rao To use STD_LOGIC and STD_LOGIC_VECTOR, include the following at beginning model: library IEEE; use IEEE.std_logic_1164.all; Some other commonly used IEEE library packages include: use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; These packages allow bit vector arithmetic – very useful for counters, etc. example: COUNT <= COUNT + 1; -- increments COUNT value Signals represent wires or outputs of gates, FFs, etc. Ports (ins, outs, inouts) in the entity are signals. Internal signals are often needed in complex models and are declared in the architecture description as follows: architecture architecture_name of entity_name is signal signal_name: type; : : : signal signal_name: type; begin : end architecture architecture_name; The signal type can be bit, bit_vector, std_logic, or std_logic_vector Signals can be initialized to a beginning value at the declaration BUT this is meaningless to synthesis tools since no hardware mechanism exists to produce this “power-up” init value Example: signal COUNT: bit_vector(3 downto 0) := “0101”; here := means immediate assignment and used to indicate an initial value but the normal assignment operator is <= Example: COUNT <= “0101”; this does correspond to synthesizable logic and will be recognized by tools Attributes provide information about items such as signals. The most important signal attribute is ‘event which yields a Boolean value of true if an event has just occurred on the signal to which the attribute is applied an event on a signal means a change in value signal’event allows us to condition on a transition for FFs Example: entity DFF is port (CK, D: in bit; Q: out bit); end entity DFF; architecture AUFB of DFF is begin process (CK) begin if (CK’event and CK=’1’) then Q <= D; -- occurs only on the rising edge of CK end if; end process; end architecture AUFB;