aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-01-07 18:43:34 +0100
committerTristan Gingold <tgingold@free.fr>2023-01-09 06:40:15 +0100
commit95231d681ebb1072debdeb52cd5c1b052876b299 (patch)
treebec810ce0d823725c7244c6604997b6890d7ecaf /src/synth
parenta502b334527a8b6823878b2354b9db279e912964 (diff)
downloadghdl-95231d681ebb1072debdeb52cd5c1b052876b299.tar.gz
ghdl-95231d681ebb1072debdeb52cd5c1b052876b299.tar.bz2
ghdl-95231d681ebb1072debdeb52cd5c1b052876b299.zip
synth-vhdl_stmts: handle indexes in image attribute
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/synth-vhdl_stmts.adb13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/synth/synth-vhdl_stmts.adb b/src/synth/synth-vhdl_stmts.adb
index 7f60d6c07..7d7df9fd0 100644
--- a/src/synth/synth-vhdl_stmts.adb
+++ b/src/synth/synth-vhdl_stmts.adb
@@ -151,11 +151,6 @@ package body Synth.Vhdl_Stmts is
| Iir_Kind_Dot_Attribute
| Iir_Kinds_Signal_Attribute =>
Assign_Base (Syn_Inst);
- when Iir_Kind_Function_Call =>
- Dest_Base := Synth_Expression (Syn_Inst, Pfx);
- Dest_Typ := Dest_Base.Typ;
- Dest_Off := (0, 0);
- Dest_Dyn := No_Dyn_Name;
when Iir_Kind_Indexed_Name =>
declare
@@ -288,6 +283,14 @@ package body Synth.Vhdl_Stmts is
Dest_Dyn := No_Dyn_Name;
Dest_Off := No_Value_Offsets;
end;
+
+ when Iir_Kind_Function_Call
+ | Iir_Kind_Image_Attribute =>
+ Dest_Base := Synth_Expression (Syn_Inst, Pfx);
+ Dest_Typ := Dest_Base.Typ;
+ Dest_Off := (0, 0);
+ Dest_Dyn := No_Dyn_Name;
+
when others =>
Error_Kind ("synth_assignment_prefix", Pfx);
end case;