URL
https://opencores.org/ocsvn/sdhc-sc-core/sdhc-sc-core/trunk
Subversion Repositories sdhc-sc-core
Compare Revisions
- This comparison shows the changes necessary to convert path
/sdhc-sc-core/trunk/src/grpGlobal
- from Rev 78 to Rev 79
- ↔ Reverse comparison
Rev 78 → Rev 79
/pkgGlobal/src/Global-p.vhdl
27,8 → 27,16
|
|
function LogDualis(cNumber : natural) return natural is |
variable vClimbUp : natural; |
variable vResult : natural; |
begin |
return natural(log2(real(cNumber))); |
vClimbUp := 1; |
vResult := 0; |
while vClimbUp < cNumber loop |
vClimbUp := vClimbUp * 2; |
vResult := vResult+1; |
end loop; |
return vResult; |
end function LogDualis; |
|
end package body Global; |