aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists-folds.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-08-28 10:20:34 +0200
committerTristan Gingold <tgingold@free.fr>2021-08-28 13:22:31 +0200
commitd17ac5c5afdef5007cf9c805bfd510a97fc3e752 (patch)
treec816162cb12e6b688d1023772ee4cd1ed687d453 /src/synth/netlists-folds.adb
parent3c8db435b536117eeceb65693e2493033a3d664b (diff)
downloadghdl-d17ac5c5afdef5007cf9c805bfd510a97fc3e752.tar.gz
ghdl-d17ac5c5afdef5007cf9c805bfd510a97fc3e752.tar.bz2
ghdl-d17ac5c5afdef5007cf9c805bfd510a97fc3e752.zip
synth: add build2_concat2 and use it for vhdl concat.
Diffstat (limited to 'src/synth/netlists-folds.adb')
-rw-r--r--src/synth/netlists-folds.adb11
1 files changed, 11 insertions, 0 deletions
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;