From 2578241c6795bacfd6819d0065edb855681bd669 Mon Sep 17 00:00:00 2001 From: "Pavel V. Shatov (Meister)" Date: Wed, 23 Oct 2019 19:17:57 +0300 Subject: Fixed clog2() replacement. --- util/cryptech_clog2.vh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'util') 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 -- cgit v1.2.3