From 95ed6e48350f612583da1a1cff90c0b64b2e1f76 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 11 Apr 2020 07:31:47 +0200 Subject: synth-oper: handle more operators. --- src/synth/synth-oper.adb | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/synth/synth-oper.adb b/src/synth/synth-oper.adb index 82b660933..79f5ea743 100644 --- a/src/synth/synth-oper.adb +++ b/src/synth/synth-oper.adb @@ -408,10 +408,9 @@ package body Synth.Oper is return Create_Value_Net (N, Expr_Typ); end Synth_Minmax; - function Synth_Compare_Array (Id, Id_Eq : Compare_Module_Id; + function Synth_Compare_Array (Id : Compare_Module_Id; Res_Type : Type_Acc) return Valtyp is - pragma Unreferenced (Id_Eq); N : Net; begin if Left.Typ.Kind = Type_Vector then @@ -815,9 +814,11 @@ package body Synth.Oper is end if; return Synth_Compare (Id_Ne, Boolean_Type); when Iir_Predefined_Array_Greater => - return Synth_Compare_Array (Id_Ugt, Id_Uge, Boolean_Type); + return Synth_Compare_Array (Id_Ugt, Boolean_Type); + when Iir_Predefined_Array_Greater_Equal => + return Synth_Compare_Array (Id_Uge, Boolean_Type); when Iir_Predefined_Array_Less => - return Synth_Compare_Array (Id_Ult, Id_Ule, Boolean_Type); + return Synth_Compare_Array (Id_Ult, Boolean_Type); when Iir_Predefined_Ieee_Numeric_Std_Add_Uns_Nat | Iir_Predefined_Ieee_Std_Logic_Unsigned_Add_Slv_Int => @@ -1067,8 +1068,9 @@ package body Synth.Oper is end if; return Synth_Compare_Uns_Nat (Id_Ult, Expr_Typ); when Iir_Predefined_Ieee_Numeric_Std_Lt_Uns_Uns + | Iir_Predefined_Ieee_Numeric_Std_Match_Lt_Uns_Uns | Iir_Predefined_Ieee_Std_Logic_Unsigned_Lt_Slv_Slv - | Iir_Predefined_Ieee_Numeric_Std_Match_Lt_Uns_Uns => + | Iir_Predefined_Ieee_Std_Logic_Arith_Lt_Uns_Uns => -- "<" (Unsigned, Unsigned) [resize] return Synth_Compare_Uns_Uns (Id_Ult, Expr_Typ); when Iir_Predefined_Ieee_Numeric_Std_Lt_Nat_Uns @@ -1142,8 +1144,9 @@ package body Synth.Oper is return Synth_Compare_Int_Sgn (Id_Sgt, Expr_Typ); when Iir_Predefined_Ieee_Numeric_Std_Ge_Uns_Uns + | Iir_Predefined_Ieee_Numeric_Std_Match_Ge_Uns_Uns | Iir_Predefined_Ieee_Std_Logic_Unsigned_Ge_Slv_Slv - | Iir_Predefined_Ieee_Numeric_Std_Match_Ge_Uns_Uns => + | Iir_Predefined_Ieee_Std_Logic_Arith_Ge_Uns_Uns => -- ">=" (Unsigned, Unsigned) [resize] return Synth_Compare_Uns_Uns (Id_Uge, Expr_Typ); when Iir_Predefined_Ieee_Numeric_Std_Ge_Nat_Uns -- cgit v1.2.3