SlideShare a Scribd company logo
5
Most read
14
Most read
18
Most read
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

PDF
Vlsi lab viva question with answers
PPT
Driving large capacitive loads
PDF
Decimation and Interpolation
PPT
Multipliers in VLSI
PPT
Switch level modeling
PPTX
Pre emphasis and de-emphasis
PPT
VLSI subsystem design processes and illustration
Vlsi lab viva question with answers
Driving large capacitive loads
Decimation and Interpolation
Multipliers in VLSI
Switch level modeling
Pre emphasis and de-emphasis
VLSI subsystem design processes and illustration

What's hot (20)

PPTX
Comparison between the FPGA vs CPLD
PPTX
Orthogonal Frequency Division Multiplexing (OFDM)
PPTX
carrier synchronization
PPT
Delta Modulation
PPTX
Ripple Carry Adder
PDF
Vlsi design notes
PPSX
Amplitude shift keying (ask)
PPT
Analog to digital converters, adc
PPTX
Companding and DPCM and ADPCM
PDF
Frequency-Shift Keying
PPTX
BCH Codes
PPS
Pulse modulation
PPTX
Magic tee
PPTX
FM demodulation using PLL
PPTX
Coherent and Non-coherent detection of ASK, FSK AND QASK
PPTX
I2C Protocol
PDF
ASK,FSK and M-PSK using Matlab
PPTX
OPERATING OVERLOADING IN VHDL
PPTX
DIFFERENTIAL AMPLIFIER using MOSFET
Comparison between the FPGA vs CPLD
Orthogonal Frequency Division Multiplexing (OFDM)
carrier synchronization
Delta Modulation
Ripple Carry Adder
Vlsi design notes
Amplitude shift keying (ask)
Analog to digital converters, adc
Companding and DPCM and ADPCM
Frequency-Shift Keying
BCH Codes
Pulse modulation
Magic tee
FM demodulation using PLL
Coherent and Non-coherent detection of ASK, FSK AND QASK
I2C Protocol
ASK,FSK and M-PSK using Matlab
OPERATING OVERLOADING IN VHDL
DIFFERENTIAL AMPLIFIER using MOSFET
Ad

Similar to Attributes in VHDL (20)

PPT
DIGITAL ELECTRONICS AND LOGIC DESIGN
PPTX
Data types and Operators
DOCX
PPTX
sequentialcircuitsindigitalelectronics.pptx
PPTX
Module 3 : using value type variables
PPT
VHDL-Data-Types.ppt
PDF
Session2
PDF
Lect 2 getting to know your data
PPTX
system verilog complete details with introduction
PPTX
The Other HPC: High Productivity Computing in Polystore Environments
PPTX
Introduction to System verilog
PDF
advancedvlsisystemverilogbychinnifinal-201114060759.pdf
PDF
Matlab for beginners, Introduction, signal processing
PPTX
VHDL power point presentation for beginners
DOCX
PPT
Week6.ppt
PPT
OODIAGRAMS.ppt
PPT
OODIAGRAMS (4).ppt
PPT
OODIAGRAMS.ppt
PPTX
Functional verification using System verilog introduction
DIGITAL ELECTRONICS AND LOGIC DESIGN
Data types and Operators
sequentialcircuitsindigitalelectronics.pptx
Module 3 : using value type variables
VHDL-Data-Types.ppt
Session2
Lect 2 getting to know your data
system verilog complete details with introduction
The Other HPC: High Productivity Computing in Polystore Environments
Introduction to System verilog
advancedvlsisystemverilogbychinnifinal-201114060759.pdf
Matlab for beginners, Introduction, signal processing
VHDL power point presentation for beginners
Week6.ppt
OODIAGRAMS.ppt
OODIAGRAMS (4).ppt
OODIAGRAMS.ppt
Functional verification using System verilog introduction
Ad

Recently uploaded (20)

PDF
Well-logging-methods_new................
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPT
Total quality management ppt for engineering students
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PPT
Project quality management in manufacturing
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PDF
737-MAX_SRG.pdf student reference guides
PDF
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
PPTX
Safety Seminar civil to be ensured for safe working.
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PDF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
PPTX
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Well-logging-methods_new................
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
Embodied AI: Ushering in the Next Era of Intelligent Systems
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Total quality management ppt for engineering students
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Automation-in-Manufacturing-Chapter-Introduction.pdf
Fundamentals of safety and accident prevention -final (1).pptx
Project quality management in manufacturing
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
III.4.1.2_The_Space_Environment.p pdffdf
737-MAX_SRG.pdf student reference guides
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
Safety Seminar civil to be ensured for safe working.
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...

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