diff options
| author | Tristan Gingold <tgingold@free.fr> | 2019-09-05 09:22:18 +0200 | 
|---|---|---|
| committer | Tristan Gingold <tgingold@free.fr> | 2019-09-05 09:22:18 +0200 | 
| commit | 6fcdde1aff1115a683d48235d1533a41f0ffaba5 (patch) | |
| tree | 83f30624b3cf60647dff44e54f969380d454a133 /src | |
| parent | f6d49eb62dac359c96aefc79d3d0ae8f907dc8d9 (diff) | |
| download | ghdl-6fcdde1aff1115a683d48235d1533a41f0ffaba5.tar.gz ghdl-6fcdde1aff1115a683d48235d1533a41f0ffaba5.tar.bz2 ghdl-6fcdde1aff1115a683d48235d1533a41f0ffaba5.zip | |
synth: handle non-constant array aggregates.
Diffstat (limited to 'src')
| -rw-r--r-- | src/synth/netlists-concats.ads | 2 | ||||
| -rw-r--r-- | src/synth/synth-context.adb | 14 | 
2 files changed, 15 insertions, 1 deletions
| diff --git a/src/synth/netlists-concats.ads b/src/synth/netlists-concats.ads index 3b1e9cb93..7f3e81898 100644 --- a/src/synth/netlists-concats.ads +++ b/src/synth/netlists-concats.ads @@ -24,7 +24,7 @@ with Netlists.Builders; use Netlists.Builders;  package Netlists.Concats is     type Concat_Type is limited private; -   --  Append net N to C. +   --  Append net N to C.  The first net appended will be at offset 0.     procedure Append (C : in out Concat_Type; N : Net);     --  Get the concatenation of all nets in C.  Reset C. diff --git a/src/synth/synth-context.adb b/src/synth/synth-context.adb index 0024c3bb9..b87f9b06b 100644 --- a/src/synth/synth-context.adb +++ b/src/synth/synth-context.adb @@ -24,7 +24,9 @@ with Types; use Types;  with Tables;  with Types_Utils; use Types_Utils;  with Vhdl.Errors; use Vhdl.Errors; +  with Netlists.Builders; use Netlists.Builders; +with Netlists.Concats;  with Synth.Errors; use Synth.Errors;  with Synth.Expr; use Synth.Expr; @@ -410,6 +412,18 @@ package body Synth.Context is                    end;                 end if;              end; +         when Value_Array => +            declare +               use Netlists.Concats; +               C : Concat_Type; +               Res : Net; +            begin +               for I in Val.Arr.V'Range loop +                  Append (C, Get_Net (Val.Arr.V (I))); +               end loop; +               Build (Build_Context, C, Res); +               return Res; +            end;           when others =>              raise Internal_Error;        end case; | 
