aboutsummaryrefslogtreecommitdiffstats
path: root/src/mutils.ads
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-01-01 21:13:57 +0100
committerTristan Gingold <tgingold@free.fr>2020-01-01 21:13:57 +0100
commit467a0f2ae8ba8762ffbdd53bbdaf786c02c4ff2c (patch)
tree97ce29cd40bc2eb9d0b27aacad5116cc1a1340db /src/mutils.ads
parentfd93de50136669c7f6043cca4a0ad3eccdfbf00a (diff)
downloadghdl-467a0f2ae8ba8762ffbdd53bbdaf786c02c4ff2c.tar.gz
ghdl-467a0f2ae8ba8762ffbdd53bbdaf786c02c4ff2c.tar.bz2
ghdl-467a0f2ae8ba8762ffbdd53bbdaf786c02c4ff2c.zip
synth: optimize integer mod for power of 2.
Diffstat (limited to 'src/mutils.ads')
-rw-r--r--src/mutils.ads3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mutils.ads b/src/mutils.ads
index 4275fe6c0..1a3afd4f1 100644
--- a/src/mutils.ads
+++ b/src/mutils.ads
@@ -4,4 +4,7 @@ package Mutils is
-- Return the ceiling log2 of V.
-- Returns 0 for 0.
function Clog2 (V : Uns64) return Integer;
+
+ -- Return True IFF V is 0 or a power of 2.
+ function Is_Power2 (V : Uns64) return Boolean;
end Mutils;