diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-01-11 06:39:25 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-01-11 06:39:25 +0100 |
commit | 94c9804c990fd3a76a2dd1385e14a8c8d76f3e77 (patch) | |
tree | 8921b21b3e089d13607e916788370919c768faf6 /src/vhdl/simulate/simul-environments.adb | |
parent | 5a74fc4623feb495512954cf4bee809e0eeb097c (diff) | |
download | ghdl-94c9804c990fd3a76a2dd1385e14a8c8d76f3e77.tar.gz ghdl-94c9804c990fd3a76a2dd1385e14a8c8d76f3e77.tar.bz2 ghdl-94c9804c990fd3a76a2dd1385e14a8c8d76f3e77.zip |
simul: refactoring.
Diffstat (limited to 'src/vhdl/simulate/simul-environments.adb')
-rw-r--r-- | src/vhdl/simulate/simul-environments.adb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/vhdl/simulate/simul-environments.adb b/src/vhdl/simulate/simul-environments.adb index 662fd1729..7a722a53a 100644 --- a/src/vhdl/simulate/simul-environments.adb +++ b/src/vhdl/simulate/simul-environments.adb @@ -557,7 +557,6 @@ package body Simul.Environments is return Create_Range_Value (Left, Right, Dir, Len); end Create_Range_Value; - -- Return an array of length LENGTH. function Create_Array_Value (Dim : Iir_Index32; Pool : Areapool_Acc := Current_Pool) return Iir_Value_Literal_Acc @@ -580,9 +579,9 @@ package body Simul.Environments is return Res; end Create_Array_Value; - procedure Create_Array_Data (Arr : Iir_Value_Literal_Acc; - Len : Iir_Index32; + function Create_Value_Array (Len : Iir_Index32; Pool : Areapool_Acc := Current_Pool) + return Value_Array_Acc is use System; subtype Data_Type is Value_Array (Len); @@ -605,7 +604,14 @@ package body Simul.Environments is null; end; - Arr.Val_Array := To_Value_Array_Acc (Res); + return To_Value_Array_Acc (Res); + end Create_Value_Array; + + procedure Create_Array_Data (Arr : Iir_Value_Literal_Acc; + Len : Iir_Index32; + Pool : Areapool_Acc := Current_Pool) is + begin + Arr.Val_Array := Create_Value_Array (Len, Pool); end Create_Array_Data; function Create_Array_Value (Length: Iir_Index32; |