From de6ca601a8e016b17b161d1e0fb4e0528381a977 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 23 Dec 2022 18:49:15 +0100 Subject: synth-vhdl_stmts(Aggregate_Array_Extract): fix offset for vector extraction --- src/synth/synth-vhdl_stmts.adb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3