SlideShare a Scribd company logo
1 of 18
Presented by:
Saurav Agrawal
M-Tech(2nd Sem)
Subject seminar
on
ATTRIBUTES
Priyadarshini College of Engineering , Nagpur
ATTRIBUTES
 Attributes are a feature of VHDL that allow you to extract
additional information about an object (such as a signal,
variable or type).
 Attributes also allow you to assign additional information
(such as data related to synthesis) to objects in your
design description.
 An attribute is a value, function, type, range, signal, or a
constant.
 An Attribute can be associated with certain names.
There are two classes of attributes:
 Predefined Attributes : Those that are predefined as a
part of the 1076 standard.
 User-Defined Attributes: Those that have been
introduced outside of the standard.
Predefined Attributes
There are five classes of predefined attributes.
1. Value attributes: these return a constant value
2. Function attributes: calls a function that returns a
value
3. Signal attributes: creates a new signal
4. Type attributes: returns a type name
5. Range attributes: returns a range
Value attributes
If T is any scalar type or subtype,
 T'LEFT: returns the left bound, that is, the leftmost value,
of T.
 T'RIGHT: returns the right bound, that is, the rightmost
value, of T.
 T'HIGH: returns the upper bound, that is, the value at the
highest position number, of T.
 T'LOW: returns the lower bound, that is, the value at the
lowest position number, of T.
For example, if
type ALLOWED_VALUE is range 31 downto 0;
Then the following equivalence relations are true:
 ALLOWED_VALUE'LEFT = 31
 ALLOWED_VALUE'HIGH = 31
 ALLOWED_VALUE'RIGHT = 0
 ALLOWED_VALUE'LOW = ALLOWED_VALUE'RIGHT
Function Attributes
These attributes represent functions that are called to obtain
a value.
 T'POS(V): returns the position number of the value V in
the ordered list of values of T.
 T'VAL(P): returns the value of the type that corresponds
to position P.
 T'SUCC(V): returns the value of the parameter whose
position is one larger than the position of value V in T.
 T'PRED(V): returns the value of the parameter whose
position is one less than the position of value V in type T.
 T'LEFTOF(V): returns the value of the parameter that is
to the left of value V in type T.
 T'RIGHTOF(V): returns the value of the parameter that is
to the right of value V in type T.
For example, if
type STATUS is (SILENT, SEND, RECEIVE);
subtype DELAY_TIME is TIME range 10 ns to 50 ns;
Then
 STATUS'POS(SEND) = 1
 DELAY_TIME'SUCC(21 ns) = 22 ns
 DELAY_TIME'PRED(10 ns) is an error
If A is a constrained array object, then
 A'LEFT(N): returns the left bound of the Nth dimension
of the array.
 A'R.IGHT(N): returns the right bound of the Nth
dimension.
 A'LOW(N): returns the lower bound of the Nth
dimension.
 A'HIGH(N): returns the upper bound of the Nth
dimension.
If
type COST_TYPE is array (7 downto 0,0 to 3) of
INTEGER;
variable COST_MATRIX: COST_TYPE;
 then the following equivalence relations are true:
 COST_MATRIX'LEFT(2) = 0
Signal Attributes
These attributes create new signals from the signals with
which they are associated.
 S'DELAYED (T): is a new signal that is the same type as
signal S but delayed from S by time T. If T is not
specified, a delay of 0ns is assumed.
 S'STABLE (T): is a Boolean signal that is true when
signal S has not had any event for time T. If T is not
specified, it implies current delta.
 S'QUIET (T): creates a Boolean signal that is true when
S has not been active for time T.
 S’TRANSACTION: creates a bit type signal that toggles
its value every time signal S becomes active.
Stable Attribute
Signal’stable(time) creates a signal that is True when the reference
signal has no events for time value
Type Attributes
If T is any type or subtype, T'BASE, which is the only type
attribute, returns the base type of T.
For example, if
type ALU_OPS is (ADDOP, SUBOP, MULOP, DIVOP,
ANDOP, NANDOP, OROP, NOROP);
subtype ARITH_OPS is ALU_OPS range ADDOP to
DIVOP;
then
 ARITH_OPS'BASE is ALU_OPS
 which is the base type, and it can be used in an expression
such as
 ARITH_OPS'BASE'LEFT which has the value ADDOP.
Range Attributes
If A is a constrained array object, then
 A'RANGE (N): returns the Nth index range of A (N=l, if
not specified).
 A'REVERSE.RANGE(N): returns the Nth index range
reversed.
For example, if
variable WBUS: MVL_VECTOR(7 downto 0);
then
 WBUS'RANGE returns the range 7 downto 0
while
User-Defined Attributes
User-defined attributes are constants of any type. They
are declared using attribute declarations.
attribute attribute-name: value-type;
For example,
type INCHES is range 0 to 1000
units micron;
end units;
attribute LENGTH: INCHES;
The syntax for an attribute specification is
attribute attribute-name of item-names: name-class is
expression;
Some examples of attribute specifications are
 attribute CAPACITANCE of CLK, RESET: signal is 20
pf;
 attribute LENGTH of RX_READY: signal is 3 micron;
 attribute CAPACITANCE of all: variable is 0 pf;
The value of the attribute can then be used in an
expression by referring to
architecture NAND_PLACE of NAND_GATE is
component NAND_COMP
port (IN1, IN2: in BIT; OUT1: out BIT);
end component;
type COMP_LOCATION is record
X, Y: INTEGER;
end record;
attribute PLACEMENT: COMP_LOCATION;
attribute PLACEMENT of N1: label is (50, 45);
signal PERIMETER: INTEGER;
signal A, B, Z: BIT;
begin
N1: NAND_COMP port map (A, B, Z);
PERIMETER <= 2 * (N1'PLACEMENT.X +
N1'PLACEMENT.Y);
Reference
 http://www.ics.uci.edu/~jmoorkan/vhdlref/attrib.html
 http://www.csee.umbc.edu/portal/help/VHDL/attribute.
html
 http://web.engr.oregonstate.edu/~sllu/vhdl/lec5.html
 VHDL Programming by example- Douglas L. Perry
 VHDL Primer - J. Bhaskar
Attributes in VHDL

More Related Content

What's hot

LED and LASER source in optical communication
LED and LASER source in optical communicationLED and LASER source in optical communication
LED and LASER source in optical communicationbhupender rawat
 
spectrum analyzers ppt
spectrum analyzers pptspectrum analyzers ppt
spectrum analyzers pptAvinash Jadhav
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerSudhanshu Janwadkar
 
Superhetrodyne receiver
Superhetrodyne receiverSuperhetrodyne receiver
Superhetrodyne receiverlrsst
 
Amplitude Modulation ppt
Amplitude Modulation pptAmplitude Modulation ppt
Amplitude Modulation pptPriyanka Mathur
 
Power delay profile,delay spread and doppler spread
Power delay profile,delay spread and doppler spreadPower delay profile,delay spread and doppler spread
Power delay profile,delay spread and doppler spreadManish Srivastava
 
VLSI Testing Techniques
VLSI Testing TechniquesVLSI Testing Techniques
VLSI Testing TechniquesA B Shinde
 
DAC-digital to analog converter
DAC-digital to analog converterDAC-digital to analog converter
DAC-digital to analog converterShazid Reaj
 
Pulse Modulation ppt
Pulse Modulation pptPulse Modulation ppt
Pulse Modulation pptsanjeev2419
 
EC6701 RF&MW - VSWR Meter
EC6701 RF&MW - VSWR MeterEC6701 RF&MW - VSWR Meter
EC6701 RF&MW - VSWR Meterchitrarengasamy
 
Design and implementation of qpsk modulator using digital subcarrier
Design and implementation of qpsk modulator using digital subcarrierDesign and implementation of qpsk modulator using digital subcarrier
Design and implementation of qpsk modulator using digital subcarrierGongadi Nagaraju
 
Distortion annalyser
Distortion annalyserDistortion annalyser
Distortion annalysermks mk
 
Phase shifter presentation
Phase shifter presentationPhase shifter presentation
Phase shifter presentationalbertvinay
 
Modulation techniques
Modulation techniquesModulation techniques
Modulation techniquesSathish Kumar
 

What's hot (20)

LED and LASER source in optical communication
LED and LASER source in optical communicationLED and LASER source in optical communication
LED and LASER source in optical communication
 
Lecture6 modulation
Lecture6 modulationLecture6 modulation
Lecture6 modulation
 
spectrum analyzers ppt
spectrum analyzers pptspectrum analyzers ppt
spectrum analyzers ppt
 
Pulse width modulation
Pulse width modulationPulse width modulation
Pulse width modulation
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 Microcontroller
 
Microwave Attenuator
Microwave AttenuatorMicrowave Attenuator
Microwave Attenuator
 
Superhetrodyne receiver
Superhetrodyne receiverSuperhetrodyne receiver
Superhetrodyne receiver
 
ASk,FSK,PSK
ASk,FSK,PSKASk,FSK,PSK
ASk,FSK,PSK
 
Amplitude Modulation ppt
Amplitude Modulation pptAmplitude Modulation ppt
Amplitude Modulation ppt
 
Pn sequence
Pn sequencePn sequence
Pn sequence
 
Power delay profile,delay spread and doppler spread
Power delay profile,delay spread and doppler spreadPower delay profile,delay spread and doppler spread
Power delay profile,delay spread and doppler spread
 
VLSI Testing Techniques
VLSI Testing TechniquesVLSI Testing Techniques
VLSI Testing Techniques
 
DAC-digital to analog converter
DAC-digital to analog converterDAC-digital to analog converter
DAC-digital to analog converter
 
Pulse Modulation ppt
Pulse Modulation pptPulse Modulation ppt
Pulse Modulation ppt
 
LINEAR INTEGRATED CIRCUITS
LINEAR INTEGRATED CIRCUITSLINEAR INTEGRATED CIRCUITS
LINEAR INTEGRATED CIRCUITS
 
EC6701 RF&MW - VSWR Meter
EC6701 RF&MW - VSWR MeterEC6701 RF&MW - VSWR Meter
EC6701 RF&MW - VSWR Meter
 
Design and implementation of qpsk modulator using digital subcarrier
Design and implementation of qpsk modulator using digital subcarrierDesign and implementation of qpsk modulator using digital subcarrier
Design and implementation of qpsk modulator using digital subcarrier
 
Distortion annalyser
Distortion annalyserDistortion annalyser
Distortion annalyser
 
Phase shifter presentation
Phase shifter presentationPhase shifter presentation
Phase shifter presentation
 
Modulation techniques
Modulation techniquesModulation techniques
Modulation techniques
 

Similar to Attributes in VHDL

All About ... Functions
All About ... FunctionsAll About ... Functions
All About ... FunctionsMichal Bigos
 
CS-XII Python Fundamentals.pdf
CS-XII Python Fundamentals.pdfCS-XII Python Fundamentals.pdf
CS-XII Python Fundamentals.pdfIda Lumintu
 
JavaScript number object.pptx
JavaScript number object.pptxJavaScript number object.pptx
JavaScript number object.pptxSteins18
 
sequentialcircuitsindigitalelectronics.pptx
sequentialcircuitsindigitalelectronics.pptxsequentialcircuitsindigitalelectronics.pptx
sequentialcircuitsindigitalelectronics.pptxS075AbhishekDeshmukh
 
Linq and lambda
Linq and lambdaLinq and lambda
Linq and lambdaJohn Walsh
 
IMP PPT- Python programming fundamentals.pptx
IMP PPT- Python programming fundamentals.pptxIMP PPT- Python programming fundamentals.pptx
IMP PPT- Python programming fundamentals.pptxlemonchoos
 
C UNIT-3 PREPARED BY M V B REDDY
C UNIT-3 PREPARED BY M V B REDDYC UNIT-3 PREPARED BY M V B REDDY
C UNIT-3 PREPARED BY M V B REDDYRajeshkumar Reddy
 
Oracle sql functions
Oracle sql functionsOracle sql functions
Oracle sql functionsVivek Singh
 
2 data structure in R
2 data structure in R2 data structure in R
2 data structure in Rnaroranisha
 
Bsc cs i pic u-4 function, storage class and array and strings
Bsc cs i pic u-4 function, storage class and array and stringsBsc cs i pic u-4 function, storage class and array and strings
Bsc cs i pic u-4 function, storage class and array and stringsRai University
 
relational model.pptx
relational model.pptxrelational model.pptx
relational model.pptxThangamaniR3
 
14. Query Optimization in DBMS
14. Query Optimization in DBMS14. Query Optimization in DBMS
14. Query Optimization in DBMSkoolkampus
 
Btech i pic u-4 function, storage class and array and strings
Btech i pic u-4 function, storage class and array and stringsBtech i pic u-4 function, storage class and array and strings
Btech i pic u-4 function, storage class and array and stringsRai University
 
Functions torage class and array and strings-
Functions torage class and array and strings-Functions torage class and array and strings-
Functions torage class and array and strings-aneebkmct
 
Python variables and data types.pptx
Python variables and data types.pptxPython variables and data types.pptx
Python variables and data types.pptxAkshayAggarwal79
 

Similar to Attributes in VHDL (20)

All About ... Functions
All About ... FunctionsAll About ... Functions
All About ... Functions
 
CS-XII Python Fundamentals.pdf
CS-XII Python Fundamentals.pdfCS-XII Python Fundamentals.pdf
CS-XII Python Fundamentals.pdf
 
JavaScript number object.pptx
JavaScript number object.pptxJavaScript number object.pptx
JavaScript number object.pptx
 
sequentialcircuitsindigitalelectronics.pptx
sequentialcircuitsindigitalelectronics.pptxsequentialcircuitsindigitalelectronics.pptx
sequentialcircuitsindigitalelectronics.pptx
 
Python PPT2
Python PPT2Python PPT2
Python PPT2
 
Linq and lambda
Linq and lambdaLinq and lambda
Linq and lambda
 
IMP PPT- Python programming fundamentals.pptx
IMP PPT- Python programming fundamentals.pptxIMP PPT- Python programming fundamentals.pptx
IMP PPT- Python programming fundamentals.pptx
 
Ch5a
Ch5aCh5a
Ch5a
 
C UNIT-3 PREPARED BY M V B REDDY
C UNIT-3 PREPARED BY M V B REDDYC UNIT-3 PREPARED BY M V B REDDY
C UNIT-3 PREPARED BY M V B REDDY
 
C pointers and references
C pointers and referencesC pointers and references
C pointers and references
 
Oracle sql functions
Oracle sql functionsOracle sql functions
Oracle sql functions
 
ASNP
ASNPASNP
ASNP
 
2 data structure in R
2 data structure in R2 data structure in R
2 data structure in R
 
Bsc cs i pic u-4 function, storage class and array and strings
Bsc cs i pic u-4 function, storage class and array and stringsBsc cs i pic u-4 function, storage class and array and strings
Bsc cs i pic u-4 function, storage class and array and strings
 
Of Lambdas and LINQ
Of Lambdas and LINQOf Lambdas and LINQ
Of Lambdas and LINQ
 
relational model.pptx
relational model.pptxrelational model.pptx
relational model.pptx
 
14. Query Optimization in DBMS
14. Query Optimization in DBMS14. Query Optimization in DBMS
14. Query Optimization in DBMS
 
Btech i pic u-4 function, storage class and array and strings
Btech i pic u-4 function, storage class and array and stringsBtech i pic u-4 function, storage class and array and strings
Btech i pic u-4 function, storage class and array and strings
 
Functions torage class and array and strings-
Functions torage class and array and strings-Functions torage class and array and strings-
Functions torage class and array and strings-
 
Python variables and data types.pptx
Python variables and data types.pptxPython variables and data types.pptx
Python variables and data types.pptx
 

Recently uploaded

Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
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
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
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
 
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
 
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
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIkoyaldeepu123
 

Recently uploaded (20)

POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
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
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
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
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
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
 
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
 
🔝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...
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
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
 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AI
 

Attributes in VHDL

  • 1. Presented by: Saurav Agrawal M-Tech(2nd Sem) Subject seminar on ATTRIBUTES Priyadarshini College of Engineering , Nagpur
  • 2. ATTRIBUTES  Attributes are a feature of VHDL that allow you to extract additional information about an object (such as a signal, variable or type).  Attributes also allow you to assign additional information (such as data related to synthesis) to objects in your design description.  An attribute is a value, function, type, range, signal, or a constant.  An Attribute can be associated with certain names.
  • 3. There are two classes of attributes:  Predefined Attributes : Those that are predefined as a part of the 1076 standard.  User-Defined Attributes: Those that have been introduced outside of the standard.
  • 4. Predefined Attributes There are five classes of predefined attributes. 1. Value attributes: these return a constant value 2. Function attributes: calls a function that returns a value 3. Signal attributes: creates a new signal 4. Type attributes: returns a type name 5. Range attributes: returns a range
  • 5. Value attributes If T is any scalar type or subtype,  T'LEFT: returns the left bound, that is, the leftmost value, of T.  T'RIGHT: returns the right bound, that is, the rightmost value, of T.  T'HIGH: returns the upper bound, that is, the value at the highest position number, of T.  T'LOW: returns the lower bound, that is, the value at the lowest position number, of T.
  • 6. For example, if type ALLOWED_VALUE is range 31 downto 0; Then the following equivalence relations are true:  ALLOWED_VALUE'LEFT = 31  ALLOWED_VALUE'HIGH = 31  ALLOWED_VALUE'RIGHT = 0  ALLOWED_VALUE'LOW = ALLOWED_VALUE'RIGHT
  • 7. Function Attributes These attributes represent functions that are called to obtain a value.  T'POS(V): returns the position number of the value V in the ordered list of values of T.  T'VAL(P): returns the value of the type that corresponds to position P.  T'SUCC(V): returns the value of the parameter whose position is one larger than the position of value V in T.  T'PRED(V): returns the value of the parameter whose position is one less than the position of value V in type T.  T'LEFTOF(V): returns the value of the parameter that is to the left of value V in type T.  T'RIGHTOF(V): returns the value of the parameter that is to the right of value V in type T.
  • 8. For example, if type STATUS is (SILENT, SEND, RECEIVE); subtype DELAY_TIME is TIME range 10 ns to 50 ns; Then  STATUS'POS(SEND) = 1  DELAY_TIME'SUCC(21 ns) = 22 ns  DELAY_TIME'PRED(10 ns) is an error
  • 9. If A is a constrained array object, then  A'LEFT(N): returns the left bound of the Nth dimension of the array.  A'R.IGHT(N): returns the right bound of the Nth dimension.  A'LOW(N): returns the lower bound of the Nth dimension.  A'HIGH(N): returns the upper bound of the Nth dimension. If type COST_TYPE is array (7 downto 0,0 to 3) of INTEGER; variable COST_MATRIX: COST_TYPE;  then the following equivalence relations are true:  COST_MATRIX'LEFT(2) = 0
  • 10. Signal Attributes These attributes create new signals from the signals with which they are associated.  S'DELAYED (T): is a new signal that is the same type as signal S but delayed from S by time T. If T is not specified, a delay of 0ns is assumed.  S'STABLE (T): is a Boolean signal that is true when signal S has not had any event for time T. If T is not specified, it implies current delta.  S'QUIET (T): creates a Boolean signal that is true when S has not been active for time T.  S’TRANSACTION: creates a bit type signal that toggles its value every time signal S becomes active.
  • 11. Stable Attribute Signal’stable(time) creates a signal that is True when the reference signal has no events for time value
  • 12. Type Attributes If T is any type or subtype, T'BASE, which is the only type attribute, returns the base type of T. For example, if type ALU_OPS is (ADDOP, SUBOP, MULOP, DIVOP, ANDOP, NANDOP, OROP, NOROP); subtype ARITH_OPS is ALU_OPS range ADDOP to DIVOP; then  ARITH_OPS'BASE is ALU_OPS  which is the base type, and it can be used in an expression such as  ARITH_OPS'BASE'LEFT which has the value ADDOP.
  • 13. Range Attributes If A is a constrained array object, then  A'RANGE (N): returns the Nth index range of A (N=l, if not specified).  A'REVERSE.RANGE(N): returns the Nth index range reversed. For example, if variable WBUS: MVL_VECTOR(7 downto 0); then  WBUS'RANGE returns the range 7 downto 0 while
  • 14. User-Defined Attributes User-defined attributes are constants of any type. They are declared using attribute declarations. attribute attribute-name: value-type; For example, type INCHES is range 0 to 1000 units micron; end units; attribute LENGTH: INCHES;
  • 15. The syntax for an attribute specification is attribute attribute-name of item-names: name-class is expression; Some examples of attribute specifications are  attribute CAPACITANCE of CLK, RESET: signal is 20 pf;  attribute LENGTH of RX_READY: signal is 3 micron;  attribute CAPACITANCE of all: variable is 0 pf; The value of the attribute can then be used in an expression by referring to
  • 16. architecture NAND_PLACE of NAND_GATE is component NAND_COMP port (IN1, IN2: in BIT; OUT1: out BIT); end component; type COMP_LOCATION is record X, Y: INTEGER; end record; attribute PLACEMENT: COMP_LOCATION; attribute PLACEMENT of N1: label is (50, 45); signal PERIMETER: INTEGER; signal A, B, Z: BIT; begin N1: NAND_COMP port map (A, B, Z); PERIMETER <= 2 * (N1'PLACEMENT.X + N1'PLACEMENT.Y);
  • 17. Reference  http://www.ics.uci.edu/~jmoorkan/vhdlref/attrib.html  http://www.csee.umbc.edu/portal/help/VHDL/attribute. html  http://web.engr.oregonstate.edu/~sllu/vhdl/lec5.html  VHDL Programming by example- Douglas L. Perry  VHDL Primer - J. Bhaskar