diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-12-23 18:49:15 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-12-26 10:25:19 +0100 |
commit | de6ca601a8e016b17b161d1e0fb4e0528381a977 (patch) | |
tree | 01861d052aa3041117c333e33db1c16f38420625 | |
parent | a1b9335c08140fc9fc5d02591f3cb2870c5ba988 (diff) | |
download | ghdl-de6ca601a8e016b17b161d1e0fb4e0528381a977.tar.gz ghdl-de6ca601a8e016b17b161d1e0fb4e0528381a977.tar.bz2 ghdl-de6ca601a8e016b17b161d1e0fb4e0528381a977.zip |
synth-vhdl_stmts(Aggregate_Array_Extract): fix offset for vector extraction
-rw-r--r-- | src/synth/synth-vhdl_stmts.adb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/synth/synth-vhdl_stmts.adb b/src/synth/synth-vhdl_stmts.adb index 58e04afad..c010ced3e 100644 --- a/src/synth/synth-vhdl_stmts.adb +++ b/src/synth/synth-vhdl_stmts.adb @@ -466,7 +466,8 @@ package body Synth.Vhdl_Stmts is -- Need to reverse offsets. Copy_Memory (Res.Val.Mem, - Val.Val.Mem + (Val.Typ.Sz - Size_Type (Off + 1) * El_Typ.Sz), + Val.Val.Mem + + (Val.Typ.Sz - Typ.Sz - Size_Type (Off) * El_Typ.Sz), Typ.Sz); return Res; end; |