mirror of
https://github.com/hoglet67/AtomBusMon.git
synced 2024-12-22 01:30:18 +00:00
Eliminated some warnings - changes mostly cosmetic
Change-Id: Ic7a7a107f9343bac2b49512d92ee2ad8f13c8bb2
This commit is contained in:
parent
de16b3af1a
commit
5410c32db3
@ -175,17 +175,16 @@ package body AVRuCPackage is
|
||||
function LOG2(Number : positive) return natural is
|
||||
variable Temp : positive;
|
||||
begin
|
||||
Temp := 1;
|
||||
if Number=1 then
|
||||
return 0;
|
||||
else
|
||||
for i in 1 to integer'high loop
|
||||
Temp := 2*Temp;
|
||||
if Temp>=Number then
|
||||
return i;
|
||||
end if;
|
||||
end loop;
|
||||
end if;
|
||||
Temp := 1;
|
||||
if Number>1 then
|
||||
for i in 1 to integer'high loop
|
||||
Temp := 2*Temp;
|
||||
if Temp>=Number then
|
||||
return i;
|
||||
end if;
|
||||
end loop;
|
||||
end if;
|
||||
return 0;
|
||||
end LOG2;
|
||||
-- End of functions
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user