From d17ac5c5afdef5007cf9c805bfd510a97fc3e752 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 28 Aug 2021 10:20:34 +0200 Subject: synth: add build2_concat2 and use it for vhdl concat. --- src/synth/netlists-folds.adb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/synth/netlists-folds.adb') diff --git a/src/synth/netlists-folds.adb b/src/synth/netlists-folds.adb index c3fc3d022..e1477870b 100644 --- a/src/synth/netlists-folds.adb +++ b/src/synth/netlists-folds.adb @@ -86,6 +86,17 @@ package body Netlists.Folds is end if; end Build2_Const_Int; + function Build2_Concat2 (Ctxt : Context_Acc; L, R : Net) return Net is + begin + if Get_Width (L) = 0 then + return R; + elsif Get_Width (R) = 0 then + return L; + else + return Build_Concat2 (Ctxt, L, R); + end if; + end Build2_Concat2; + function Build2_Concat (Ctxt : Context_Acc; Els : Net_Array) return Net is F : constant Int32 := Els'First; -- cgit v1.2.3