VHDL Seminar
Ajay K S
Reg. no. 13S06001
Data types
Data object:
A data object holds a value of
specified type. It is created by
means of an object declaration.
Eg: variable COUNT : INTEGER
Here data object called COUNT,
which hold integer values. The
object COUNT is also declared to be
of variable class.
Classes of data object:
1. Constant
2. Variable
3. Signal
4. File
Data Types:
Every data object in VHDL can hold a
value that belongs to a set of
values. This set of values is
specified by using a type
declaration. A type is a name that
has associated with a set of values
and a set of operations.
Eg: For INTEGER type operators are
+ for addition, - for subrtaction, *
for multiplication, / for division.
Data Types:
For BOOLEAN type some operators are
and, or, nor, nand, xor, xnor, not.
A major categories of data type are
1. Scalar types: Here values
belonging to these types appear in
sequential order.
Eg: BIT is a scalar type. The expression
0<1 is valid & has the value TRUE.
There are 4 kinds of scalar types.
Those are
a)
Enumeration type
b)
Integer type
c)
Physical type
d)
Floating type
A). Enumeration type:
It defines a type that has a set of
user defined values consisting of
identifiers and character literals.
Eg: type MVL is (U,0,1,z);
B). Integer type:
It defines a type whose set of values
fall within a specified integer
range.
Here range of integer is (2^31-1) to
+(2^31-1)
Eg: type INDEX is range 0 to 15;
C). Floating point type:
A floating point type has a set of values in
a given range of real numbers.
Eg: type TTL_VOLTAGE is range 5.5 to
9.5
D). Physical type:
It contain values that represent
measurement of some physical
quantity, like time, length, voltage,
current.
Eg: type CURRENT is range 0 to 19
units;
2. Composite type:
A composite type represents a collection
of values.
2 types are :
a)
Recorded type
b)
Array type
a). Array type:
It consist of elements that have same
type.
Eg: type ADRESS_WORD is array (0
to 63) of BIT;
b). Record type:
An object of a record type is
composed of elements of same or
different types.
Eg: type PIN_TYPE is range 0 to 10;
3. Access type:
A value belonging to access type are
pointers to a dynamically allocated
object of some other type.
Eg: type PTR is access MODULE;
4. File type:
Objects of the file type represent files in
the host environment. They provide a
mechanism by which a VHDL design
communicates with the host
environment.
Syntax of file type representationis.
file_type_name is file of
type_name;
Eg:
Type NAMES is file of STRING;
THANK YOU..