From ff3fb2d67cc187955e867f9c95818689261ae7da Mon Sep 17 00:00:00 2001 From: Tristan Gingold <tgingold@free.fr> Date: Tue, 9 Feb 2016 03:43:47 +0100 Subject: simul: handle slice in individual association for subprograms. --- src/vhdl/simulate/execution.adb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/vhdl/simulate/execution.adb b/src/vhdl/simulate/execution.adb index 5ec6efeb8..cf9fecac5 100644 --- a/src/vhdl/simulate/execution.adb +++ b/src/vhdl/simulate/execution.adb @@ -3468,6 +3468,17 @@ package body Execution is when Iir_Kind_Indexed_Name => Execute_Indexed_Name (Block, Formal, Pfx, Pos); Store (Pfx.Val_Array.V (Pos + 1), Actual); + when Iir_Kind_Slice_Name => + declare + Low, High : Iir_Index32; + Srange : Iir_Value_Literal_Acc; + begin + Srange := Execute_Bounds (Block, Get_Suffix (Formal)); + Execute_Slice_Name (Pfx, Srange, Low, High, Formal); + for I in 1 .. High - Low + 1 loop + Store (Pfx.Val_Array.V (Low + I), Actual.Val_Array.V (I)); + end loop; + end; when Iir_Kind_Selected_Element => Pos := Get_Element_Position (Get_Selected_Element (Formal)); Store (Pfx.Val_Record.V (Pos + 1), Actual); -- cgit v1.2.3