aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/simulate
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-02-09 03:43:47 +0100
committerTristan Gingold <tgingold@free.fr>2016-02-10 07:52:53 +0100
commitff3fb2d67cc187955e867f9c95818689261ae7da (patch)
treeb633a657aa17e5a83f756613269b81325375227f /src/vhdl/simulate
parentf79be5ce0aacd1184a15040ef9f0a5ac5acde036 (diff)
downloadghdl-ff3fb2d67cc187955e867f9c95818689261ae7da.tar.gz
ghdl-ff3fb2d67cc187955e867f9c95818689261ae7da.tar.bz2
ghdl-ff3fb2d67cc187955e867f9c95818689261ae7da.zip
simul: handle slice in individual association for subprograms.
Diffstat (limited to 'src/vhdl/simulate')
-rw-r--r--src/vhdl/simulate/execution.adb11
1 files changed, 11 insertions, 0 deletions
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);