Specifications
How to Write Synthesizable VHDL
3-6 VHDL Reference Manual
Arithmetic Operators
The arithmetic operators in VHDL are defined for numeric types
(integer and real). The operators are listed in Table 3-2. In addition,
overloaded versions of the + and - operators are supplied in the
packages bit_ops and std_logic_ops for the types bit_vector and
std_logic_vector, respectively.
Note: The VHDL synthesizer does not distinguish between integer and
real number values. Floating point values are constrained to the same
range of values as integers.
Figure 3-2: Relational Operators
Table 3-2: Arithmetic Operators
Operator Description
++ Addition
= Subtraction
* Multiplication
/ Division
mod Modulus
rem Remainder
abs Absolute Value
** Exponentiation
While the addition and subtraction operators (+, -) are somewhat
expensive in terms of gates required, the multiplication operators (*,
/, mod, rem) are extremely expensive. The VHDL synthesizer does
make special optimizations, however, when the right hand operator is
a constant and an even power of 2.