1
0
SEm-Labos/Libs/AhbLite/hdl/ahbLite_pkg_body.vhd
github-classroom[bot] d212040c30
Initial commit
2024-02-23 13:01:05 +00:00

16 lines
343 B
VHDL

PACKAGE BODY ahbLite IS
function addressBitNb (addressNb : natural) return natural is
variable powerOfTwo, bitNb : natural;
begin
powerOfTwo := 1;
bitNb := 0;
while powerOfTwo <= addressNb loop
powerOfTwo := 2 * powerOfTwo;
bitNb := bitNb + 1;
end loop;
return bitNb;
end addressBitNb;
END ahbLite;