From e0a61cad47e6b10c9b28b1558a3595e381625910 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 28 Mar 2020 10:38:46 +0100 Subject: synth-oper: handle to_integer for signed. --- src/synth/synth-oper.adb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/synth/synth-oper.adb b/src/synth/synth-oper.adb index d99e0f836..e5d51f006 100644 --- a/src/synth/synth-oper.adb +++ b/src/synth/synth-oper.adb @@ -1510,6 +1510,15 @@ package body Synth.Oper is return Create_Value_Net (Synth_Uresize (Get_Net (L), Int_Type.W, Expr), Int_Type); end; + when Iir_Predefined_Ieee_Numeric_Std_Toint_Sgn_Int => + -- SIGNED to Integer. + declare + Int_Type : constant Type_Acc := + Get_Value_Type (Subprg_Inst, Get_Type (Imp)); + begin + return Create_Value_Net + (Synth_Sresize (L, Int_Type.W, Expr), Int_Type); + end; when Iir_Predefined_Ieee_Numeric_Std_Resize_Uns_Nat => declare W : Width; -- cgit v1.2.3