From 15dd6b468d4f1e83ee0948b54b8892ae1502b74f Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 12 Oct 2019 19:17:07 +0200 Subject: synth-oper: handle unsigned unsigned mul. --- src/synth/synth-oper.adb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/synth/synth-oper.adb b/src/synth/synth-oper.adb index 8f85a8817..04380259b 100644 --- a/src/synth/synth-oper.adb +++ b/src/synth/synth-oper.adb @@ -539,6 +539,19 @@ package body Synth.Oper is return Create_Value_Net (N, Create_Vec_Type_By_Length (W, Left.Typ.Vec_El)); end; + when Iir_Predefined_Ieee_Numeric_Std_Mul_Uns_Uns => + declare + W : constant Width := Left.Typ.W + Right.Typ.W; + L, R : Net; + N : Net; + begin + L := Synth_Uresize (Left, W, Left_Expr); + R := Synth_Uresize (Right, W, Right_Expr); + N := Build_Dyadic (Build_Context, Id_Umul, L, R); + Set_Location (N, Expr); + return Create_Value_Net + (N, Create_Vec_Type_By_Length (W, Left.Typ.Vec_El)); + end; when Iir_Predefined_Ieee_Numeric_Std_Mul_Uns_Nat => declare L : constant Net := Get_Net (Left); -- cgit v1.2.3