aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/types_utils.ads
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-04-22 06:29:09 +0200
committerTristan Gingold <tgingold@free.fr>2020-04-22 06:29:09 +0200
commit5841b245ee5f3d31b1c1856a443d6aed26fcf582 (patch)
tree87c52f61ccee86476f7f87b7d1d33431f9ecf735 /src/synth/types_utils.ads
parent5b9fb81982ef2405772013509016ecede70fd238 (diff)
downloadghdl-5841b245ee5f3d31b1c1856a443d6aed26fcf582.tar.gz
ghdl-5841b245ee5f3d31b1c1856a443d6aed26fcf582.tar.bz2
ghdl-5841b245ee5f3d31b1c1856a443d6aed26fcf582.zip
synth: minor refactoring.
Diffstat (limited to 'src/synth/types_utils.ads')
-rw-r--r--src/synth/types_utils.ads4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/synth/types_utils.ads b/src/synth/types_utils.ads
index 71bdf5399..04196e11c 100644
--- a/src/synth/types_utils.ads
+++ b/src/synth/types_utils.ads
@@ -35,4 +35,8 @@ package Types_Utils is
function To_Uns64 is new Ada.Unchecked_Conversion
(Fp64, Uns64);
+
+ -- Sign extend V: bit SZ is copied to bits SZ + 1 .. 63/31.
+ function Sext (V : Uns64; Sz : Natural) return Uns64;
+ function Sext (V : Uns32; Sz : Natural) return Uns32;
end Types_Utils;