This repository has been archived on 2025-05-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
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;