The operators in VHDL are divided into four categories:
⦁ Arithmetic operators
⦁ Shift operators
⦁ Relational operators
⦁ Logical operators
Operator overloading:
Operator overloading is the most useful feature of the VHDL language
Operators work only on specific types
+: only on integer, real, physical types
&: only on arrays
If a designer wants to use a particular operator on user defined types, the operator should be overloaded.
+ is used only for the numeration type, to add 2-bit vector it doesn’t work so designer need to write a function that overload the operator for this operation.
Operator overloading is a declaration of a function whose designator is an operator symbol. The operator is called overloaded if there is more than one function specifying it for different data and result types. It is a manner in which the system allows the same operator name or symbol to be used for multiple operations.
0 Comments