M
Mike Treseler
Guest
Mike Treseler wrote:
function, and to_integer(my_uns) as needed.rickman wrote:
function sllint (x, sh : natural) return natural is
begin
return x*(2**sh);
end sllint;
I am not clear on what happens when I shift the value of Addr left by
2 and significant bits extend beyond the defined range.
The function, as written, will return x*(2**sh)
up to the natural range. It knows nothing about
any other range unless you add a parameter
to to function.
I would use numeric_std.unsigned and the shift_left
function, and to_integer(my_uns, my_len) as needed.
-- Mike Treseler