Abstract Data Type Example
A first example will be the implementation of an Abstract Data Type (ADT) in VHDL
An Abstract Data Type consists of two things
- The custom VHDL data types and subtypes
- Operators that manipulate data of those custom types
Examples of ADTs include :
- Queue data type
- Finite state machine data type
- Floating and complex data type
- Vector and matrix data types
Notes:
Abstract data types (ADTs) are objects which can be used to represent an activity or component in behavioral modeling. An ADT supports data hiding, encapsulation, and parameterized reuse. As such they give VHDL some object-oriented capability.
An ADT is both a data structure (such as a stack, queue, tree, etc.) and a set of functions (e.g. operators) that provide useful services of the data. For example, a stack ADT would have functions for pushing an element onto the stack, retrieving an item from the stack, and perhaps several user-accessible attributes such as whether the stack is full or empty.