aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/grt/grt-avhpi.adb3
-rw-r--r--src/grt/grt-fst.adb4
-rw-r--r--src/grt/grt-images.adb10
-rw-r--r--src/grt/grt-images.ads1
-rw-r--r--src/grt/grt-rtis_utils.adb10
-rw-r--r--src/grt/grt-to_strings.adb152
-rw-r--r--src/grt/grt-to_strings.ads68
-rw-r--r--src/grt/grt-vcd.adb6
-rw-r--r--src/grt/grt-vstrings.adb122
-rw-r--r--src/grt/grt-vstrings.ads41
-rw-r--r--src/vhdl/simulate/simul-execution.adb19
11 files changed, 247 insertions, 189 deletions
diff --git a/src/grt/grt-avhpi.adb b/src/grt/grt-avhpi.adb
index 1a6239f1a..374dcc3a6 100644
--- a/src/grt/grt-avhpi.adb
+++ b/src/grt/grt-avhpi.adb
@@ -25,6 +25,7 @@
with Grt.Errors; use Grt.Errors;
with Grt.Vstrings; use Grt.Vstrings;
with Grt.Rtis_Utils; use Grt.Rtis_Utils;
+with Grt.To_Strings;
package body Grt.Avhpi is
procedure Get_Root_Inst (Res : out VhpiHandleT) is
@@ -743,7 +744,7 @@ package body Grt.Avhpi is
end if;
case Iter_Type.Kind is
when Ghdl_Rtik_Type_I32 =>
- To_String (Buf, Buf_Len, Vptr.I32);
+ Grt.To_Strings.To_String (Buf, Buf_Len, Vptr.I32);
Add (Buf (Buf_Len .. Buf'Last));
-- when Ghdl_Rtik_Type_E8 =>
-- Disp_Enum_Value
diff --git a/src/grt/grt-fst.adb b/src/grt/grt-fst.adb
index 10a8a1eed..7f689aa61 100644
--- a/src/grt/grt-fst.adb
+++ b/src/grt/grt-fst.adb
@@ -51,7 +51,7 @@ with Grt.Astdio; use Grt.Astdio;
with Grt.Hooks; use Grt.Hooks;
with Grt.Rtis; use Grt.Rtis;
with Grt.Rtis_Types; use Grt.Rtis_Types;
-with Grt.Vstrings;
+with Grt.To_Strings;
with Grt.Wave_Opt; use Grt.Wave_Opt;
with Grt.Wave_Opt.Design; use Grt.Wave_Opt.Design;
with Ada.Unchecked_Deallocation;
@@ -367,7 +367,7 @@ package body Grt.Fst is
Num_First : Natural;
Num_Len : Natural;
begin
- Grt.Vstrings.To_String (Num, Num_First, N);
+ Grt.To_Strings.To_String (Num, Num_First, N);
Num_Len := Num'Last - Num_First + 1;
Name2 (Name_Len + 1 .. Name_Len + Num_Len) :=
Num (Num_First .. Num'Last);
diff --git a/src/grt/grt-images.adb b/src/grt/grt-images.adb
index b9ba82928..d048b195d 100644
--- a/src/grt/grt-images.adb
+++ b/src/grt/grt-images.adb
@@ -23,13 +23,11 @@
-- however invalidate any other reasons why the executable file might be
-- covered by the GNU Public License.
with System; use System;
-with System.Storage_Elements; -- Work around GNAT bug.
-pragma Unreferenced (System.Storage_Elements);
with Ada.Unchecked_Conversion;
with Grt.Rtis_Utils; use Grt.Rtis_Utils;
with Grt.Processes; use Grt.Processes;
-with Grt.Vstrings; use Grt.Vstrings;
with Grt.Errors; use Grt.Errors;
+with Grt.To_Strings; use Grt.To_Strings;
package body Grt.Images is
function To_Std_String_Basep is new Ada.Unchecked_Conversion
@@ -187,7 +185,7 @@ package body Grt.Images is
(Res : Std_String_Ptr; Val : Ghdl_F64; Format : Std_String_Ptr)
is
C_Format : String (1 .. Positive (Format.Bounds.Dim_1.Length + 1));
- Str : Grt.Vstrings.String_Real_Format;
+ Str : String_Real_Format;
P : Natural;
begin
for I in 1 .. C_Format'Last - 1 loop
@@ -332,7 +330,7 @@ package body Grt.Images is
(Res : Std_String_Ptr;
Val : Std_Time; Unit : Std_Time; Rti : Ghdl_Rti_Access)
is
- Str : Grt.Vstrings.String_Time_Unit;
+ Str : String_Time_Unit;
First : Natural;
Phys : constant Ghdl_Rtin_Type_Physical_Acc
:= To_Ghdl_Rtin_Type_Physical_Acc (Rti);
@@ -350,7 +348,7 @@ package body Grt.Images is
if Unit_Name = null then
Error ("no unit for to_string");
end if;
- Grt.Vstrings.To_String (Str, First, Ghdl_I64 (Val), Ghdl_I64 (Unit));
+ To_String (Str, First, Ghdl_I64 (Val), Ghdl_I64 (Unit));
Unit_Len := strlen (Unit_Name);
declare
L : constant Natural := Str'Last + 1 - First;
diff --git a/src/grt/grt-images.ads b/src/grt/grt-images.ads
index afbaaadd1..75c291675 100644
--- a/src/grt/grt-images.ads
+++ b/src/grt/grt-images.ads
@@ -81,6 +81,7 @@ package Grt.Images is
procedure Ghdl_BV_To_Hstring (Res : Std_String_Ptr;
Base : Std_Bit_Vector_Basep;
Len : Ghdl_Index_Type);
+
private
pragma Export (Ada, Ghdl_Image_B1, "__ghdl_image_b1");
pragma Export (C, Ghdl_Image_E8, "__ghdl_image_e8");
diff --git a/src/grt/grt-rtis_utils.adb b/src/grt/grt-rtis_utils.adb
index 8f30aba43..0b7e43e2b 100644
--- a/src/grt/grt-rtis_utils.adb
+++ b/src/grt/grt-rtis_utils.adb
@@ -24,6 +24,7 @@
-- covered by the GNU Public License.
with Grt.Errors; use Grt.Errors;
+with Grt.To_Strings; use Grt.To_Strings;
package body Grt.Rtis_Utils is
@@ -301,11 +302,10 @@ package body Grt.Rtis_Utils is
end case;
end Range_Pos_To_Val;
- procedure Pos_To_Vstring
- (Vstr : in out Vstring;
- Rti : Ghdl_Rti_Access;
- Rng : Ghdl_Range_Ptr;
- Pos : Ghdl_Index_Type)
+ procedure Pos_To_Vstring (Vstr : in out Vstring;
+ Rti : Ghdl_Rti_Access;
+ Rng : Ghdl_Range_Ptr;
+ Pos : Ghdl_Index_Type)
is
V : Value_Union;
begin
diff --git a/src/grt/grt-to_strings.adb b/src/grt/grt-to_strings.adb
new file mode 100644
index 000000000..7efde1612
--- /dev/null
+++ b/src/grt/grt-to_strings.adb
@@ -0,0 +1,152 @@
+-- GHDL Run Time (GRT) - 'image subprograms.
+-- Copyright (C) 2002 - 2014 Tristan Gingold
+--
+-- GHDL is free software; you can redistribute it and/or modify it under
+-- the terms of the GNU General Public License as published by the Free
+-- Software Foundation; either version 2, or (at your option) any later
+-- version.
+--
+-- GHDL is distributed in the hope that it will be useful, but WITHOUT ANY
+-- WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-- for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with GCC; see the file COPYING. If not, write to the Free
+-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+-- 02111-1307, USA.
+--
+-- As a special exception, if other files instantiate generics from this
+-- unit, or you link this unit with other files to produce an executable,
+-- this unit does not by itself cause the resulting executable to be
+-- covered by the GNU General Public License. This exception does not
+-- however invalidate any other reasons why the executable file might be
+-- covered by the GNU Public License.
+
+with Interfaces;
+with Ada.Unchecked_Conversion;
+with Grt.Errors; use Grt.Errors;
+with Grt.Fcvt;
+
+package body Grt.To_Strings is
+ generic
+ type Ntype is range <>;
+ --Max_Len : Natural;
+ procedure Gen_To_String (Str : out String; First : out Natural; N : Ntype);
+
+ procedure Gen_To_String (Str : out String; First : out Natural; N : Ntype)
+ is
+ subtype R_Type is String (1 .. Str'Length);
+ S : R_Type renames Str;
+ P : Natural := S'Last;
+ V : Ntype;
+ begin
+ if N > 0 then
+ V := -N;
+ else
+ V := N;
+ end if;
+ loop
+ S (P) := Character'Val (48 - (V rem 10));
+ V := V / 10;
+ exit when V = 0;
+ P := P - 1;
+ end loop;
+ if N < 0 then
+ P := P - 1;
+ S (P) := '-';
+ end if;
+ First := P;
+ end Gen_To_String;
+
+ procedure To_String_I32 is new Gen_To_String (Ntype => Ghdl_I32);
+
+ procedure To_String (Str : out String; First : out Natural; N : Ghdl_I32)
+ renames To_String_I32;
+
+ procedure To_String_I64 is new Gen_To_String (Ntype => Ghdl_I64);
+
+ procedure To_String (Str : out String; First : out Natural; N : Ghdl_I64)
+ renames To_String_I64;
+
+ procedure To_String (Str : out String; Last : out Natural; N : Ghdl_F64) is
+ begin
+ Grt.Fcvt.Format_Image (Str, Last, Interfaces.IEEE_Float_64 (N));
+ end To_String;
+
+ procedure To_String (Str : out String;
+ Last : out Natural;
+ N : Ghdl_F64;
+ Nbr_Digits : Ghdl_I32) is
+ begin
+ Grt.Fcvt.Format_Digits
+ (Str, Last, Interfaces.IEEE_Float_64 (N), Natural (Nbr_Digits));
+ end To_String;
+
+ procedure To_String (Str : out String_Real_Format;
+ Last : out Natural;
+ N : Ghdl_F64;
+ Format : Ghdl_C_String)
+ is
+ procedure Snprintf_Fmtf (Str : in out String;
+ Len : Natural;
+ Format : Ghdl_C_String;
+ V : Ghdl_F64);
+ pragma Import (C, Snprintf_Fmtf, "__ghdl_snprintf_fmtf");
+ begin
+ -- FIXME: check format ('%', f/g/e/a)
+ Snprintf_Fmtf (Str, Str'Length, Format, N);
+ Last := strlen (To_Ghdl_C_String (Str'Address));
+ end To_String;
+
+ procedure To_String (Str : out String_Time_Unit;
+ First : out Natural;
+ Value : Ghdl_I64;
+ Unit : Ghdl_I64)
+ is
+ V, U : Ghdl_I64;
+ D : Natural;
+ P : Natural := Str'Last;
+ Has_Digits : Boolean;
+ begin
+ -- Always work on negative values.
+ if Value > 0 then
+ V := -Value;
+ else
+ V := Value;
+ end if;
+
+ Has_Digits := False;
+ U := Unit;
+ loop
+ if U = 1 then
+ if Has_Digits then
+ Str (P) := '.';
+ P := P - 1;
+ else
+ Has_Digits := True;
+ end if;
+ end if;
+
+ D := Natural (-(V rem 10));
+ if D /= 0 or else Has_Digits then
+ Str (P) := Character'Val (48 + D);
+ P := P - 1;
+ Has_Digits := True;
+ end if;
+ U := U / 10;
+ V := V / 10;
+ exit when V = 0 and then U = 0;
+ end loop;
+ if not Has_Digits then
+ Str (P) := '0';
+ else
+ P := P + 1;
+ end if;
+ if Value < 0 then
+ P := P - 1;
+ Str (P) := '-';
+ end if;
+ First := P;
+ end To_String;
+end Grt.To_Strings;
diff --git a/src/grt/grt-to_strings.ads b/src/grt/grt-to_strings.ads
new file mode 100644
index 000000000..af60f4332
--- /dev/null
+++ b/src/grt/grt-to_strings.ads
@@ -0,0 +1,68 @@
+-- GHDL Run Time (GRT) - to_string subprograms.
+-- Copyright (C) 2002 - 2019 Tristan Gingold
+--
+-- GHDL is free software; you can redistribute it and/or modify it under
+-- the terms of the GNU General Public License as published by the Free
+-- Software Foundation; either version 2, or (at your option) any later
+-- version.
+--
+-- GHDL is distributed in the hope that it will be useful, but WITHOUT ANY
+-- WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-- for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with GCC; see the file COPYING. If not, write to the Free
+-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+-- 02111-1307, USA.
+--
+-- As a special exception, if other files instantiate generics from this
+-- unit, or you link this unit with other files to produce an executable,
+-- this unit does not by itself cause the resulting executable to be
+-- covered by the GNU General Public License. This exception does not
+-- however invalidate any other reasons why the executable file might be
+-- covered by the GNU Public License.
+with Grt.Types; use Grt.Types;
+
+package Grt.To_Strings is
+ -- Write the image of N into STR padded to the right. FIRST is the index
+ -- of the first character, so the result is in STR (FIRST .. STR'last).
+ -- Requires at least 11 characters.
+ procedure To_String (Str : out String; First : out Natural; N : Ghdl_I32);
+
+ -- Write the image of N into STR padded to the right. FIRST is the index
+ -- of the first character, so the result is in STR (FIRST .. STR'last).
+ -- Requires at least 21 characters.
+ procedure To_String (Str : out String; First : out Natural; N : Ghdl_I64);
+
+ -- Write the image of N into STR. LAST is the index of the last character,
+ -- so the result is in STR (STR'first .. LAST).
+ -- Requires at least 24 characters.
+ -- Sign (1) + digit (1) + dot (1) + digits (15) + exp (1) + sign (1)
+ -- + exp_digits (4) -> 24.
+ procedure To_String (Str : out String; Last : out Natural; N : Ghdl_F64);
+
+ -- Write the image of N into STR using NBR_DIGITS digits after the decimal
+ -- point.
+ procedure To_String (Str : out String;
+ Last : out Natural;
+ N : Ghdl_F64;
+ Nbr_Digits : Ghdl_I32);
+
+ subtype String_Real_Format is String (1 .. 128);
+
+ -- Write the image of N into STR using NBR_DIGITS digits after the decimal
+ -- point.
+ procedure To_String (Str : out String_Real_Format;
+ Last : out Natural;
+ N : Ghdl_F64;
+ Format : Ghdl_C_String);
+
+ -- Write the image of VALUE to STR using UNIT as unit. The output is in
+ -- STR (FIRST .. STR'last).
+ subtype String_Time_Unit is String (1 .. 22);
+ procedure To_String (Str : out String_Time_Unit;
+ First : out Natural;
+ Value : Ghdl_I64;
+ Unit : Ghdl_I64);
+end Grt.To_Strings;
diff --git a/src/grt/grt-vcd.adb b/src/grt/grt-vcd.adb
index b058dcdaf..6722f2a75 100644
--- a/src/grt/grt-vcd.adb
+++ b/src/grt/grt-vcd.adb
@@ -49,7 +49,7 @@ with Grt.Rtis; use Grt.Rtis;
with Grt.Rtis_Addr; use Grt.Rtis_Addr;
with Grt.Rtis_Utils; use Grt.Rtis_Utils;
with Grt.Rtis_Types; use Grt.Rtis_Types;
-with Grt.Vstrings;
+with Grt.To_Strings;
with Grt.Wave_Opt; use Grt.Wave_Opt;
with Grt.Wave_Opt.Design; use Grt.Wave_Opt.Design;
with Grt.Fcvt;
@@ -165,7 +165,7 @@ package body Grt.Vcd is
Str : String (1 .. 11);
First : Natural;
begin
- Vstrings.To_String (Str, First, V);
+ To_Strings.To_String (Str, First, V);
Vcd_Put (Str (First .. Str'Last));
end Vcd_Put_I32;
@@ -821,7 +821,7 @@ package body Grt.Vcd is
First : Natural;
begin
Vcd_Putc ('#');
- Vstrings.To_String (Str, First, Ghdl_I64 (Current_Time));
+ To_Strings.To_String (Str, First, Ghdl_I64 (Current_Time));
Vcd_Put (Str (First .. Str'Last));
Vcd_Newline;
end Vcd_Put_Time;
diff --git a/src/grt/grt-vstrings.adb b/src/grt/grt-vstrings.adb
index b9fd0b8bb..af982a50c 100644
--- a/src/grt/grt-vstrings.adb
+++ b/src/grt/grt-vstrings.adb
@@ -23,10 +23,8 @@
-- however invalidate any other reasons why the executable file might be
-- covered by the GNU Public License.
-with Interfaces;
with Grt.Errors; use Grt.Errors;
with Grt.C; use Grt.C;
-with Grt.Fcvt;
package body Grt.Vstrings is
procedure Free (Fs : Fat_String_Acc);
@@ -223,124 +221,4 @@ package body Grt.Vstrings is
S := fwrite (Get_Address (Rstr), size_t (Length (Rstr)), 1, Stream);
end Put;
- generic
- type Ntype is range <>;
- --Max_Len : Natural;
- procedure Gen_To_String (Str : out String; First : out Natural; N : Ntype);
-
- procedure Gen_To_String (Str : out String; First : out Natural; N : Ntype)
- is
- subtype R_Type is String (1 .. Str'Length);
- S : R_Type renames Str;
- P : Natural := S'Last;
- V : Ntype;
- begin
- if N > 0 then
- V := -N;
- else
- V := N;
- end if;
- loop
- S (P) := Character'Val (48 - (V rem 10));
- V := V / 10;
- exit when V = 0;
- P := P - 1;
- end loop;
- if N < 0 then
- P := P - 1;
- S (P) := '-';
- end if;
- First := P;
- end Gen_To_String;
-
- procedure To_String_I32 is new Gen_To_String (Ntype => Ghdl_I32);
-
- procedure To_String (Str : out String; First : out Natural; N : Ghdl_I32)
- renames To_String_I32;
-
- procedure To_String_I64 is new Gen_To_String (Ntype => Ghdl_I64);
-
- procedure To_String (Str : out String; First : out Natural; N : Ghdl_I64)
- renames To_String_I64;
-
- procedure To_String (Str : out String; Last : out Natural; N : Ghdl_F64) is
- begin
- Grt.Fcvt.Format_Image (Str, Last, Interfaces.IEEE_Float_64 (N));
- end To_String;
-
- procedure To_String (Str : out String;
- Last : out Natural;
- N : Ghdl_F64;
- Nbr_Digits : Ghdl_I32) is
- begin
- Grt.Fcvt.Format_Digits
- (Str, Last, Interfaces.IEEE_Float_64 (N), Natural (Nbr_Digits));
- end To_String;
-
- procedure To_String (Str : out String_Real_Format;
- Last : out Natural;
- N : Ghdl_F64;
- Format : Ghdl_C_String)
- is
- procedure Snprintf_Fmtf (Str : in out String;
- Len : Natural;
- Format : Ghdl_C_String;
- V : Ghdl_F64);
- pragma Import (C, Snprintf_Fmtf, "__ghdl_snprintf_fmtf");
- begin
- -- FIXME: check format ('%', f/g/e/a)
- Snprintf_Fmtf (Str, Str'Length, Format, N);
- Last := strlen (To_Ghdl_C_String (Str'Address));
- end To_String;
-
- procedure To_String (Str : out String_Time_Unit;
- First : out Natural;
- Value : Ghdl_I64;
- Unit : Ghdl_I64)
- is
- V, U : Ghdl_I64;
- D : Natural;
- P : Natural := Str'Last;
- Has_Digits : Boolean;
- begin
- -- Always work on negative values.
- if Value > 0 then
- V := -Value;
- else
- V := Value;
- end if;
-
- Has_Digits := False;
- U := Unit;
- loop
- if U = 1 then
- if Has_Digits then
- Str (P) := '.';
- P := P - 1;
- else
- Has_Digits := True;
- end if;
- end if;
-
- D := Natural (-(V rem 10));
- if D /= 0 or else Has_Digits then
- Str (P) := Character'Val (48 + D);
- P := P - 1;
- Has_Digits := True;
- end if;
- U := U / 10;
- V := V / 10;
- exit when V = 0 and then U = 0;
- end loop;
- if not Has_Digits then
- Str (P) := '0';
- else
- P := P + 1;
- end if;
- if Value < 0 then
- P := P - 1;
- Str (P) := '-';
- end if;
- First := P;
- end To_String;
end Grt.Vstrings;
diff --git a/src/grt/grt-vstrings.ads b/src/grt/grt-vstrings.ads
index 58d92ee64..7914397a2 100644
--- a/src/grt/grt-vstrings.ads
+++ b/src/grt/grt-vstrings.ads
@@ -83,47 +83,6 @@ package Grt.Vstrings is
-- Copy RSTR to STR, and return length of the string to LEN.
procedure Copy (Rstr : Rstring; Str : in out String; Len : out Natural);
- -- Write the image of N into STR padded to the right. FIRST is the index
- -- of the first character, so the result is in STR (FIRST .. STR'last).
- -- Requires at least 11 characters.
- procedure To_String (Str : out String; First : out Natural; N : Ghdl_I32);
-
- -- Write the image of N into STR padded to the right. FIRST is the index
- -- of the first character, so the result is in STR (FIRST .. STR'last).
- -- Requires at least 21 characters.
- procedure To_String (Str : out String; First : out Natural; N : Ghdl_I64);
-
- -- Write the image of N into STR. LAST is the index of the last character,
- -- so the result is in STR (STR'first .. LAST).
- -- Requires at least 24 characters.
- -- Sign (1) + digit (1) + dot (1) + digits (15) + exp (1) + sign (1)
- -- + exp_digits (4) -> 24.
- procedure To_String (Str : out String; Last : out Natural; N : Ghdl_F64);
-
- -- Write the image of N into STR using NBR_DIGITS digits after the decimal
- -- point.
- procedure To_String (Str : out String;
- Last : out Natural;
- N : Ghdl_F64;
- Nbr_Digits : Ghdl_I32);
-
- subtype String_Real_Format is String (1 .. 128);
-
- -- Write the image of N into STR using NBR_DIGITS digits after the decimal
- -- point.
- procedure To_String (Str : out String_Real_Format;
- Last : out Natural;
- N : Ghdl_F64;
- Format : Ghdl_C_String);
-
- -- Write the image of VALUE to STR using UNIT as unit. The output is in
- -- STR (FIRST .. STR'last).
- subtype String_Time_Unit is String (1 .. 22);
- procedure To_String (Str : out String_Time_Unit;
- First : out Natural;
- Value : Ghdl_I64;
- Unit : Ghdl_I64);
-
private
subtype Fat_String is String (Positive);
type Fat_String_Acc is access Fat_String;
diff --git a/src/vhdl/simulate/simul-execution.adb b/src/vhdl/simulate/simul-execution.adb
index 62a0d214e..20b4215f5 100644
--- a/src/vhdl/simulate/simul-execution.adb
+++ b/src/vhdl/simulate/simul-execution.adb
@@ -39,6 +39,7 @@ with Grt.Astdio.Vhdl;
with Grt.Stdio;
with Grt.Options;
with Grt.Vstrings;
+with Grt.To_Strings;
with Simul.Grt_Interface;
with Grt.Values;
with Grt.Errors;
@@ -302,7 +303,7 @@ package body Simul.Execution is
Str : String (1 .. 24);
Last : Natural;
begin
- Grt.Vstrings.To_String (Str, Last, Val.F64);
+ Grt.To_Strings.To_String (Str, Last, Val.F64);
return Str (Str'First .. Last);
end;
when Iir_Kind_Integer_Type_Definition
@@ -311,7 +312,7 @@ package body Simul.Execution is
Str : String (1 .. 21);
First : Natural;
begin
- Grt.Vstrings.To_String (Str, First, Val.I64);
+ Grt.To_Strings.To_String (Str, First, Val.I64);
return Str (First .. Str'Last);
end;
when Iir_Kind_Enumeration_Type_Definition
@@ -340,7 +341,7 @@ package body Simul.Execution is
Id : constant Name_Id :=
Get_Identifier (Get_Primary_Unit (Get_Base_Type (Expr_Type)));
begin
- Grt.Vstrings.To_String (Str, First, Val.I64);
+ Grt.To_Strings.To_String (Str, First, Val.I64);
return Str (First .. Str'Last) & ' ' & Name_Table.Image (Id);
end;
when others =>
@@ -1389,10 +1390,10 @@ package body Simul.Execution is
when Iir_Predefined_Real_To_String_Digits =>
Eval_Right;
declare
- Str : Grt.Vstrings.String_Real_Format;
+ Str : Grt.To_Strings.String_Real_Format;
Last : Natural;
begin
- Grt.Vstrings.To_String
+ Grt.To_Strings.To_String
(Str, Last, Left.F64, Ghdl_I32 (Right.I64));
Result := String_To_Iir_Value (Str (1 .. Last));
end;
@@ -1400,7 +1401,7 @@ package body Simul.Execution is
Eval_Right;
declare
Format : String (1 .. Natural (Right.Val_Array.Len) + 1);
- Str : Grt.Vstrings.String_Real_Format;
+ Str : Grt.To_Strings.String_Real_Format;
Last : Natural;
begin
for I in Right.Val_Array.V'Range loop
@@ -1408,14 +1409,14 @@ package body Simul.Execution is
Character'Val (Right.Val_Array.V (I).E8);
end loop;
Format (Format'Last) := ASCII.NUL;
- Grt.Vstrings.To_String
+ Grt.To_Strings.To_String
(Str, Last, Left.F64, To_Ghdl_C_String (Format'Address));
Result := String_To_Iir_Value (Str (1 .. Last));
end;
when Iir_Predefined_Time_To_String_Unit =>
Eval_Right;
declare
- Str : Grt.Vstrings.String_Time_Unit;
+ Str : Grt.To_Strings.String_Time_Unit;
First : Natural;
Unit : Iir;
begin
@@ -1429,7 +1430,7 @@ package body Simul.Execution is
Error_Msg_Exec
("to_string for time called with wrong unit", Expr);
end if;
- Grt.Vstrings.To_String (Str, First, Left.I64, Right.I64);
+ Grt.To_Strings.To_String (Str, First, Left.I64, Right.I64);
Result := String_To_Iir_Value
(Str (First .. Str'Last) & ' '
& Name_Table.Image (Get_Identifier (Unit)));