From 512457352b96a5ac272269aebf283cecc0b8500f Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 20 Jun 2021 07:53:11 +0200 Subject: synth-vhdl_expr: adjust width of memidx for indexed names. In general the width of memidx is ignored, but it's better to correctly set it --- src/synth/synth-vhdl_expr.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/synth') diff --git a/src/synth/synth-vhdl_expr.adb b/src/synth/synth-vhdl_expr.adb index 9b2072865..72f3103af 100644 --- a/src/synth/synth-vhdl_expr.adb +++ b/src/synth/synth-vhdl_expr.adb @@ -1231,7 +1231,7 @@ package body Synth.Vhdl_Expr is Ivoff := Build_Memidx (Get_Build (Syn_Inst), Ivoff, El_Typ.W * Stride, Bnd.Len - 1, - Width (Clog2 (Uns64 (Stride * Bnd.Len)))); + Width (Clog2 (Uns64 (El_Typ.W * Stride * Bnd.Len)))); Set_Location (Ivoff, Idx_Expr); if Voff = No_Net then -- cgit v1.2.3