diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-08-28 10:20:34 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-08-28 13:22:31 +0200 |
commit | d17ac5c5afdef5007cf9c805bfd510a97fc3e752 (patch) | |
tree | c816162cb12e6b688d1023772ee4cd1ed687d453 /src/synth/netlists-folds.adb | |
parent | 3c8db435b536117eeceb65693e2493033a3d664b (diff) | |
download | ghdl-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.adb | 11 |
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; |