aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPavel V. Shatov (Meister) <meisterpaul1@yandex.ru>2019-10-23 19:17:57 +0300
committerPavel V. Shatov (Meister) <meisterpaul1@yandex.ru>2019-10-23 19:17:57 +0300
commit2578241c6795bacfd6819d0065edb855681bd669 (patch)
tree4c8055238fddc67db3d2b2d64195eb64f402bfc1 /util
parentfbcbd4218e2711da279d8097620a5b26637bf45b (diff)
Fixed clog2() replacement.
Diffstat (limited to 'util')
-rw-r--r--util/cryptech_clog2.vh11
1 files changed, 6 insertions, 5 deletions
diff --git a/util/cryptech_clog2.vh b/util/cryptech_clog2.vh
index 06120c4..d075112 100644
--- a/util/cryptech_clog2.vh
+++ b/util/cryptech_clog2.vh
@@ -30,15 +30,16 @@
//
//======================================================================
-function integer cryptech_clog2;
- input integer value;
- integer result;
+function integer cryptech_clog2;
+ input integer value_in;
+ integer value;
+ integer result;
//
begin
- value = value - 1;
+ value = value_in - 1;
for (result = 0; value > 0; result = result + 1)
value = value >> 1;
- clog2 = result;
+ cryptech_clog2 = result;
end
//
endfunction