VHDL Elements
VHDL Elements
Identifiers
Basic identifiers
Extended identifiers
Data Objects
Constant
Variable
Signal
File
Data Types
Scalar
Composite
Access
File type
Identifiers
Can be defined as the identification of any data type
Basic identifier: is composed of sequence of one or
more character.
1. It must begin with alphabetic character (a-z or
A-Z). Ex: DRIVE_BUS , SelectSignal ,
RAM_Address
2. It is case insensitive.
Composite types
Access types
File types
a.SCALAR TYPES
Values belonging to these types appear in sequential
order. i.e. these types are ordered.
i. Enumeration: An enumeration type declaration defines
a type that has a set of user-defined values consisting
of identifiers and character literals.
SYNTAX:
SYNTAX:
TYPE type_name IS range value;
E.g.
TYPE itl_voltage IS range -5.5 to -1.4;
b. COMPOSITE TYPES
Composite types represent a collection of values.
SYNTAX:
TYPE type_name IS ARRAY values;
E.g.
TYPE address_word IS ARRAY (0 to 63) of bit;
ii. Record type
It consists of elements of different data type.
SYNTAX:
E.g.
TYPE birthday IS RECORD
Day: integer range (0 to 31);
Month: month_1;
END RECORD;
c. ACCESS TYPES
Values belonging to an access type are pointers to a
dynamically allocated object of some other type.
E.g.
TYPE VECTORS IS FILE OF BIT_VECTOR;
TYPE NAME IS FILE OF STRING;
Note: Data types are also classified as
Pre-defined data
Pre-defined data types types.
User defined data types Bit
Boolean
Integer
User –defined data types
Real
Integer
Natural
Real Physical
Enumerated type Character
Array Signed
Record Unsigned
Data Types
Predefined data types.
bit values: '0', '1'
boolean values: TRUE, FALSE
integer values: -(231) to +(231 - 1)
Eg.
mvl’(‘u’)>mvl’(‘z’);
“VHDL” < “VHDL 92”
5. Shift operators
These are:
Eg.
SUBTYPE My_integer IS integer range 48 to 145;
Behavior model(Sequential Statements)
wait statement
assertion statement
report statement
signal assignment statement
variable assignment statement
procedure call statement
if statement
case statement
loop statement
next statement
exit statement
return statement
null statement