From 10f07155f071a53ebd6e45a70c449a8a262f9701 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 12 Jan 2020 21:27:58 +0100 Subject: netlists: get_net_uns64: handle id_const_sb32. --- src/synth/netlists-utils.adb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/synth') diff --git a/src/synth/netlists-utils.adb b/src/synth/netlists-utils.adb index face94c0e..f1dd42f73 100644 --- a/src/synth/netlists-utils.adb +++ b/src/synth/netlists-utils.adb @@ -148,6 +148,17 @@ package body Netlists.Utils is pragma Assert (Shift_Right (Va, Natural (Wd)) = 0); return Uns64 (Va); end; + when Id_Const_SB32 => + declare + Va : constant Uns32 := Get_Param_Uns32 (Inst, 0); + Wd : constant Natural := Natural (Get_Width (N)); + Res : Uns64; + begin + Res := Uns64 (Va); + Res := Shift_Left (Res, 64 - Wd); + Res := Shift_Right_Arithmetic (Res, 64 - Wd); + return Res; + end; when others => if Get_Width (N) = 0 then return 0; -- cgit v1.2.3