It is necessery to use type converssion in order to operate different data types.
target_type ( operand expression )
Integer B is convertd to real number first. Then the result is converted back to integer.
variable A, B : integer;
. . .
A := Integer(18.91 * real(B));
After type conversion, a new object is created called "target type". (See Example)
The type of the "operand expression" cannot be an aggregate, an allocator, the literal┬ánull or a string literal.
Closely related types can be used together in a VHDL design. But a type conversion should be done for this purpose.
Types which have the same size, or the elements of them have the same types or index types are the same in a range called closely related types.
If a floating point is converted to integer, the result will be rounded to the nearest integer.