Converting int to float and vice-versa in HDL
How about just casting them:

entity x is
end entity x;
architecture STR of x is
    signal i: integer;
    signal r: real;
begin
    i &lt;= integer(r);
    r &lt;= real(i);
end architecture STR;