aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-05-19 18:52:54 +0200
committerTristan Gingold <tgingold@free.fr>2019-05-19 20:34:12 +0200
commitbf6e695a130c85a6c17b543329831dd09ae40457 (patch)
tree9df2304660ae728bec48ece470f4d0a31d332351 /src
parentfa5614efb63cacdee5bb93ce88e8ce07f3a10f77 (diff)
downloadghdl-bf6e695a130c85a6c17b543329831dd09ae40457.tar.gz
ghdl-bf6e695a130c85a6c17b543329831dd09ae40457.tar.bz2
ghdl-bf6e695a130c85a6c17b543329831dd09ae40457.zip
Add simple_IO - to be used instead of Text_IO.
Diffstat (limited to 'src')
-rw-r--r--src/bug.adb48
-rw-r--r--src/errorout-console.adb45
-rw-r--r--src/ghdldrv/ghdlcomp.adb13
-rw-r--r--src/ghdldrv/ghdldrv.adb5
-rw-r--r--src/ghdldrv/ghdllocal.adb4
-rw-r--r--src/ghdldrv/ghdlmain.adb9
-rw-r--r--src/ghdldrv/ghdlrun.adb39
-rw-r--r--src/ghdldrv/ghdlsimul.adb8
-rw-r--r--src/ghdldrv/ghdlvpi.adb3
-rw-r--r--src/ghdldrv/ghdlxml.adb4
-rw-r--r--src/logging.adb6
-rw-r--r--src/options.adb5
-rw-r--r--src/simple_io.adb61
-rw-r--r--src/simple_io.ads29
-rw-r--r--src/vhdl/simulate/simul-annotations.adb15
-rw-r--r--src/vhdl/simulate/simul-debugger-ams.adb2
-rw-r--r--src/vhdl/simulate/simul-debugger.adb1
-rw-r--r--src/vhdl/simulate/simul-elaboration.adb20
-rw-r--r--src/vhdl/simulate/simul-environments.adb21
-rw-r--r--src/vhdl/simulate/simul-execution.adb26
-rw-r--r--src/vhdl/simulate/simul-simulation-main.adb6
-rw-r--r--src/vhdl/translate/trans-chap7.adb15
-rw-r--r--src/vhdl/translate/trans-chap8.adb4
-rw-r--r--src/vhdl/translate/trans_analyzes.adb6
-rw-r--r--src/vhdl/translate/trans_be.adb4
25 files changed, 228 insertions, 171 deletions
diff --git a/src/bug.adb b/src/bug.adb
index 43f28317a..334717399 100644
--- a/src/bug.adb
+++ b/src/bug.adb
@@ -15,9 +15,10 @@
-- along with GHDL; see the file COPYING. If not, write to the Free
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
-with Ada.Text_IO; use Ada.Text_IO;
+
with Ada.Command_Line; use Ada.Command_Line;
with GNAT.Directory_Operations;
+with Simple_IO; use Simple_IO;
with Version; use Version;
package body Bug is
@@ -63,19 +64,15 @@ package body Bug is
is
Id : Exception_Id;
begin
- New_Line (Standard_Error);
- Put_Line
- (Standard_Error,
- "******************** GHDL Bug occurred ***************************");
- Put_Line
- (Standard_Error,
- "Please report this bug on https://github.com/ghdl/ghdl/issues");
- Put_Line (Standard_Error,
- "GHDL release: " & Ghdl_Ver & ' ' & Ghdl_Release);
- Put_Line (Standard_Error, "Compiled with " & Get_Gnat_Version);
- Put_Line (Standard_Error, "Target: " & Standard'Target_Name);
- Put_Line (Standard_Error, "In directory: " &
- GNAT.Directory_Operations.Get_Current_Dir);
+ New_Line_Err;
+ Put_Line_Err
+ ("******************** GHDL Bug occurred ***************************");
+ Put_Line_Err
+ ("Please report this bug on https://github.com/ghdl/ghdl/issues");
+ Put_Line_Err ("GHDL release: " & Ghdl_Ver & ' ' & Ghdl_Release);
+ Put_Line_Err ("Compiled with " & Get_Gnat_Version);
+ Put_Line_Err ("Target: " & Standard'Target_Name);
+ Put_Line_Err (GNAT.Directory_Operations.Get_Current_Dir);
--Put_Line
-- ("Program name: " & Command_Name);
--Put_Line
@@ -83,24 +80,21 @@ package body Bug is
--for I in 1 .. Argument_Count loop
-- Put_Line (" " & Argument (I));
--end loop;
- Put_Line (Standard_Error, "Command line:");
- Put (Standard_Error, Command_Name);
+ Put_Line_Err ("Command line:");
+ Put_Err (Command_Name);
for I in 1 .. Argument_Count loop
- Put (Standard_Error, ' ');
- Put (Standard_Error, Argument (I));
+ Put_Err (' ');
+ Put_Err (Argument (I));
end loop;
- New_Line (Standard_Error);
+ New_Line_Err;
Id := Exception_Identity (Except);
if Id /= Null_Id then
- Put_Line (Standard_Error,
- "Exception " & Exception_Name (Id) & " raised");
+ Put_Line_Err ("Exception " & Exception_Name (Id) & " raised");
--Put_Line ("exception message: " & Exception_Message (Except));
- Put_Line (Standard_Error,
- "Exception information:");
- Put (Standard_Error, Exception_Information (Except));
+ Put_Line_Err ("Exception information:");
+ Put_Err (Exception_Information (Except));
end if;
- Put_Line
- (Standard_Error,
- "******************************************************************");
+ Put_Line_Err
+ ("******************************************************************");
end Disp_Bug_Box;
end Bug;
diff --git a/src/errorout-console.adb b/src/errorout-console.adb
index 9f25eebd5..53795538e 100644
--- a/src/errorout-console.adb
+++ b/src/errorout-console.adb
@@ -16,8 +16,8 @@
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
-with Ada.Text_IO;
with GNAT.OS_Lib;
+with Simple_IO;
with Name_Table;
with Files_Map; use Files_Map;
with Flags; use Flags;
@@ -66,12 +66,7 @@ package body Errorout.Console is
-- Switch to COLOR.
procedure Set_Color (Color : Color_Type)
is
- procedure Put (S : String)
- is
- use Ada.Text_IO;
- begin
- Put (Standard_Error, S);
- end Put;
+ use Simple_IO;
begin
if Flag_Color_Diagnostics = Off then
return;
@@ -81,17 +76,17 @@ package body Errorout.Console is
-- They are also documented on msdn in 'Console Virtual Terminal
-- sequences'.
- Put (ASCII.ESC & '[');
+ Put_Err (ASCII.ESC & '[');
case Color is
- when Color_Locus => Put ("1"); -- Bold
- when Color_Note => Put ("1;36"); -- Bold, cyan
- when Color_Warning => Put ("1;35"); -- Bold, magenta
- when Color_Error => Put ("1;31"); -- Bold, red
- when Color_Fatal => Put ("1;33"); -- Bold, yellow
- when Color_Message => Put ("0;1"); -- Normal, bold
- when Color_None => Put ("0"); -- Normal
+ when Color_Locus => Put_Err ("1"); -- Bold
+ when Color_Note => Put_Err ("1;36"); -- Bold, cyan
+ when Color_Warning => Put_Err ("1;35"); -- Bold, magenta
+ when Color_Error => Put_Err ("1;31"); -- Bold, red
+ when Color_Fatal => Put_Err ("1;33"); -- Bold, yellow
+ when Color_Message => Put_Err ("0;1"); -- Normal, bold
+ when Color_None => Put_Err ("0"); -- Normal
end case;
- Put ("m");
+ Put_Err ("m");
end Set_Color;
Msg_Len : Natural;
@@ -99,27 +94,21 @@ package body Errorout.Console is
Current_Line : Natural;
In_Group : Boolean := False;
- procedure Put (Str : String)
- is
- use Ada.Text_IO;
+ procedure Put (Str : String) is
begin
Msg_Len := Msg_Len + Str'Length;
- Put (Standard_Error, Str);
+ Simple_IO.Put_Err (Str);
end Put;
- procedure Put (C : Character)
- is
- use Ada.Text_IO;
+ procedure Put (C : Character) is
begin
Msg_Len := Msg_Len + 1;
- Put (Standard_Error, C);
+ Simple_IO.Put_Err (C);
end Put;
- procedure Put_Line (Str : String := "")
- is
- use Ada.Text_IO;
+ procedure Put_Line (Str : String := "") is
begin
- Put_Line (Standard_Error, Str);
+ Simple_IO.Put_Line_Err (Str);
Msg_Len := 0;
end Put_Line;
diff --git a/src/ghdldrv/ghdlcomp.adb b/src/ghdldrv/ghdlcomp.adb
index 542042819..cee8f037e 100644
--- a/src/ghdldrv/ghdlcomp.adb
+++ b/src/ghdldrv/ghdlcomp.adb
@@ -19,9 +19,8 @@ with Ghdlmain; use Ghdlmain;
with Ghdllocal; use Ghdllocal;
with Ada.Command_Line;
-with Ada.Characters.Latin_1;
-with Ada.Text_IO;
+with Simple_IO;
with Types;
with Flags;
with Vhdl.Sem;
@@ -97,7 +96,7 @@ package body Ghdlcomp is
procedure Disp_Long_Help (Cmd : Command_Comp)
is
- use Ada.Text_IO;
+ use Simple_IO;
begin
Disp_Long_Help (Command_Lib (Cmd));
Hooks.Disp_Long_Help.all;
@@ -600,7 +599,7 @@ package body Ghdlcomp is
procedure Disp_Config
is
- use Ada.Text_IO;
+ use Simple_IO;
use Libraries;
begin
Disp_Config_Prefixes;
@@ -616,7 +615,7 @@ package body Ghdlcomp is
Args : Argument_List)
is
pragma Unreferenced (Cmd);
- use Ada.Text_IO;
+ use Simple_IO;
begin
if Args'Length /= 0 then
Error ("--disp-config does not accept any argument");
@@ -789,11 +788,11 @@ package body Ghdlcomp is
is
pragma Unreferenced (Cmd);
use Types;
- use Ada.Text_IO;
+ use Simple_IO;
use Ada.Command_Line;
use Name_Table;
- HT : constant Character := Ada.Characters.Latin_1.HT;
+ HT : constant Character := ASCII.HT;
Files_List : Iir_List;
File : Iir_Design_File;
Files_It : List_Iterator;
diff --git a/src/ghdldrv/ghdldrv.adb b/src/ghdldrv/ghdldrv.adb
index d8e9534fc..cd810647f 100644
--- a/src/ghdldrv/ghdldrv.adb
+++ b/src/ghdldrv/ghdldrv.adb
@@ -16,11 +16,12 @@
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
with Ada.Command_Line; use Ada.Command_Line;
-with Ada.Text_IO; use Ada.Text_IO;
with Ada.Characters.Latin_1;
with GNAT.OS_Lib; use GNAT.OS_Lib;
-with Tables;
with GNAT.Dynamic_Tables;
+
+with Tables;
+with Simple_IO; use Simple_IO;
with Libraries;
with Name_Table; use Name_Table;
with Vhdl.Std_Package;
diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb
index e5fe38401..3aee26250 100644
--- a/src/ghdldrv/ghdllocal.adb
+++ b/src/ghdldrv/ghdllocal.adb
@@ -15,9 +15,11 @@
-- 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.
-with Ada.Text_IO; use Ada.Text_IO;
+
with Ada.Command_Line;
with GNAT.Directory_Operations;
+
+with Simple_IO; use Simple_IO;
with Types; use Types;
with Libraries;
with Vhdl.Sem_Lib;
diff --git a/src/ghdldrv/ghdlmain.adb b/src/ghdldrv/ghdlmain.adb
index 02e01cc1b..932228b51 100644
--- a/src/ghdldrv/ghdlmain.adb
+++ b/src/ghdldrv/ghdlmain.adb
@@ -15,9 +15,10 @@
-- 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.
-with Ada.Text_IO;
with Ada.Command_Line;
with Ada.Command_Line.Response_File;
+
+with Simple_IO;
with Version;
with Bug;
with Options;
@@ -47,7 +48,7 @@ package body Ghdlmain is
procedure Disp_Long_Help (Cmd : Command_Type)
is
pragma Unreferenced (Cmd);
- use Ada.Text_IO;
+ use Simple_IO;
begin
Put_Line ("This command does not accept options.");
end Disp_Long_Help;
@@ -121,7 +122,7 @@ package body Ghdlmain is
is
pragma Unreferenced (Cmd);
- use Ada.Text_IO;
+ use Simple_IO;
use Ada.Command_Line;
C : Command_Acc;
begin
@@ -222,7 +223,7 @@ package body Ghdlmain is
Args : Argument_List)
is
pragma Unreferenced (Cmd);
- use Ada.Text_IO;
+ use Simple_IO;
begin
Put ("GHDL ");
Put (Version.Ghdl_Ver);
diff --git a/src/ghdldrv/ghdlrun.adb b/src/ghdldrv/ghdlrun.adb
index a781d3ec9..1305ad28a 100644
--- a/src/ghdldrv/ghdlrun.adb
+++ b/src/ghdldrv/ghdlrun.adb
@@ -19,14 +19,14 @@ with System; use System;
with Ada.Unchecked_Conversion;
with Ada.Command_Line;
-with Ada.Text_IO;
+with GNAT.OS_Lib; use GNAT.OS_Lib;
with Interfaces;
with Interfaces.C;
with Ghdlmain; use Ghdlmain;
with Ghdllocal; use Ghdllocal;
-with GNAT.OS_Lib; use GNAT.OS_Lib;
+with Simple_IO; use Simple_IO;
with Ortho_Jit;
with Ortho_Nodes; use Ortho_Nodes;
@@ -178,21 +178,17 @@ package body Ghdlrun is
Time_Resolution := 'f';
end if;
if Flag_Verbose then
- declare
- use Ada.Text_IO;
- begin
- Put ("Time resolution is 1 ");
- case Time_Resolution is
- when 'f' => Put ("fs");
- when 'p' => Put ("ps");
- when 'n' => Put ("ns");
- when 'u' => Put ("us");
- when 'm' => Put ("ms");
- when 's' => Put ("sec");
- when others => Put ("??");
- end case;
- New_Line;
- end;
+ Put ("Time resolution is 1 ");
+ case Time_Resolution is
+ when 'f' => Put ("fs");
+ when 'p' => Put ("ps");
+ when 'n' => Put ("ns");
+ when 'u' => Put ("us");
+ when 'm' => Put ("ms");
+ when 's' => Put ("sec");
+ when others => Put ("??");
+ end case;
+ New_Line;
end if;
end if;
Vhdl.Std_Package.Set_Time_Resolution (Time_Resolution);
@@ -256,7 +252,6 @@ package body Ghdlrun is
procedure Ghdl_Elaborate is
begin
- --Ada.Text_IO.Put_Line (Standard_Error, "ghdl_elaborate");
Elaborate_Proc.all;
end Ghdl_Elaborate;
@@ -347,7 +342,7 @@ package body Ghdlrun is
Decl : O_Dnode;
begin
if Flag_Verbose then
- Ada.Text_IO.Put_Line ("Linking in memory");
+ Put_Line ("Linking in memory");
end if;
Def (Trans_Decls.Ghdl_Memcpy,
@@ -764,7 +759,7 @@ package body Ghdlrun is
Name_Table.Finalize;
if Flag_Verbose then
- Ada.Text_IO.Put_Line ("Starting simulation");
+ Put_Line ("Starting simulation");
end if;
Grt.Main.Run;
@@ -801,11 +796,9 @@ package body Ghdlrun is
Args : Argument_List)
is
pragma Unreferenced (Cmd);
- use Ada.Text_IO;
begin
if Args'Length /= 0 then
- Error
- ("warning: command '--run-help' does not accept any argument");
+ Error ("warning: command '--run-help' does not accept any argument");
end if;
Put_Line ("These options can only be placed at [RUNOPTS]");
-- Register modules, since they add commands.
diff --git a/src/ghdldrv/ghdlsimul.adb b/src/ghdldrv/ghdlsimul.adb
index e3c9ced5b..a37424409 100644
--- a/src/ghdldrv/ghdlsimul.adb
+++ b/src/ghdldrv/ghdlsimul.adb
@@ -16,12 +16,12 @@
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
-with Ada.Text_IO;
with Ada.Command_Line;
with Ghdllocal; use Ghdllocal;
with GNAT.OS_Lib; use GNAT.OS_Lib;
+with Simple_IO;
with Types;
with Flags;
with Name_Table;
@@ -206,11 +206,9 @@ package body Ghdlsimul is
return True;
end Decode_Option;
- procedure Disp_Long_Help
- is
- use Ada.Text_IO;
+ procedure Disp_Long_Help is
begin
- Put_Line (" --debug Run with debugger");
+ Simple_IO.Put_Line (" --debug Run with debugger");
end Disp_Long_Help;
function Get_Top_Config return Iir is
diff --git a/src/ghdldrv/ghdlvpi.adb b/src/ghdldrv/ghdlvpi.adb
index 4c25896ea..e2e142d6a 100644
--- a/src/ghdldrv/ghdlvpi.adb
+++ b/src/ghdldrv/ghdlvpi.adb
@@ -16,9 +16,10 @@
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
-with Ada.Text_IO; use Ada.Text_IO;
with GNAT.OS_Lib; use GNAT.OS_Lib;
with Ada.Command_Line; use Ada.Command_Line;
+with Simple_IO; use Simple_IO;
+
with Ghdlmain; use Ghdlmain;
with Ghdllocal;
with Default_Paths; use Default_Paths;
diff --git a/src/ghdldrv/ghdlxml.adb b/src/ghdldrv/ghdlxml.adb
index c55e0c30e..10e1644ef 100644
--- a/src/ghdldrv/ghdlxml.adb
+++ b/src/ghdldrv/ghdlxml.adb
@@ -15,8 +15,10 @@
-- 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.
-with Ada.Text_IO; use Ada.Text_IO;
+
with GNAT.OS_Lib; use GNAT.OS_Lib;
+with Simple_IO; use Simple_IO;
+
with Types; use Types;
with Name_Table; use Name_Table;
with Vhdl.Nodes_Meta; use Vhdl.Nodes_Meta;
diff --git a/src/logging.adb b/src/logging.adb
index c582b3351..11ccf9645 100644
--- a/src/logging.adb
+++ b/src/logging.adb
@@ -16,16 +16,16 @@
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
-with Ada.Text_IO; use Ada.Text_IO;
+with Simple_IO;
package body Logging is
procedure Log (S : String) is
begin
- Put (Standard_Error, S);
+ Simple_IO.Put_Err (S);
end Log;
procedure Log_Line (S : String := "") is
begin
- Put_Line (Standard_Error, S);
+ Simple_IO.Put_Line_Err (S);
end Log_Line;
end Logging;
diff --git a/src/options.adb b/src/options.adb
index 32d3ca6f1..85383b915 100644
--- a/src/options.adb
+++ b/src/options.adb
@@ -15,7 +15,8 @@
-- along with GHDL; see the file COPYING. If not, write to the Free
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
-with Ada.Text_IO;
+
+with Simple_IO;
with Name_Table;
with Errorout; use Errorout;
with Libraries;
@@ -227,7 +228,7 @@ package body Options is
-- Disp help about these options.
procedure Disp_Options_Help
is
- procedure P (S : String) renames Ada.Text_IO.Put_Line;
+ procedure P (S : String) renames Simple_IO.Put_Line;
begin
P ("Main options:");
P (" --work=LIB use LIB as work library");
diff --git a/src/simple_io.adb b/src/simple_io.adb
new file mode 100644
index 000000000..5f57d6459
--- /dev/null
+++ b/src/simple_io.adb
@@ -0,0 +1,61 @@
+-- Very simple IO package
+-- Copyright (C) 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 GHDL; see the file COPYING. If not, write to the Free
+-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+-- 02111-1307, USA.
+
+with Ada.Text_IO;
+
+package body Simple_IO is
+ procedure Put (S : String) is
+ begin
+ Ada.Text_IO.Put (S);
+ end Put;
+
+ procedure Put (C : Character) is
+ begin
+ Ada.Text_IO.Put (C);
+ end Put;
+
+ procedure Put_Line (S : String) is
+ begin
+ Ada.Text_IO.Put_Line (S);
+ end Put_Line;
+
+ procedure New_Line is
+ begin
+ Ada.Text_IO.New_Line;
+ end New_Line;
+
+ procedure Put_Err (S : String) is
+ begin
+ Ada.Text_IO.Put (Ada.Text_IO.Standard_Error, S);
+ end Put_Err;
+
+ procedure Put_Err (C : Character) is
+ begin
+ Ada.Text_IO.Put (Ada.Text_IO.Standard_Error, C);
+ end Put_Err;
+
+ procedure Put_Line_Err (S : String) is
+ begin
+ Ada.Text_IO.Put_Line (Ada.Text_IO.Standard_Error, S);
+ end Put_Line_Err;
+
+ procedure New_Line_Err is
+ begin
+ Ada.Text_IO.New_Line (Ada.Text_IO.Standard_Error);
+ end New_Line_Err;
+end Simple_IO;
diff --git a/src/simple_io.ads b/src/simple_io.ads
new file mode 100644
index 000000000..f1bf6ab38
--- /dev/null
+++ b/src/simple_io.ads
@@ -0,0 +1,29 @@
+-- Very simple IO package
+-- Copyright (C) 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 GHDL; see the file COPYING. If not, write to the Free
+-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+-- 02111-1307, USA.
+
+package Simple_IO is
+ procedure Put (S : String);
+ procedure Put (C : Character);
+ procedure Put_Line (S : String);
+ procedure New_Line;
+
+ procedure Put_Err (S : String);
+ procedure Put_Err (C : Character);
+ procedure Put_Line_Err (S : String);
+ procedure New_Line_Err;
+end Simple_IO;
diff --git a/src/vhdl/simulate/simul-annotations.adb b/src/vhdl/simulate/simul-annotations.adb
index 240464eed..2cbbfe181 100644
--- a/src/vhdl/simulate/simul-annotations.adb
+++ b/src/vhdl/simulate/simul-annotations.adb
@@ -17,7 +17,7 @@
-- 02111-1307, USA.
with Tables;
-with Ada.Text_IO;
+with Simple_IO;
with Vhdl.Std_Package;
with Vhdl.Errors; use Vhdl.Errors;
with Vhdl.Utils; use Vhdl.Utils;
@@ -1198,7 +1198,7 @@ package body Simul.Annotations is
-- Disp annotations for an iir node.
procedure Disp_Vhdl_Info (Node: Iir)
is
- use Ada.Text_IO;
+ use Simple_IO;
Info : constant Sim_Info_Acc := Get_Info (Node);
begin
if Info = null then
@@ -1231,11 +1231,8 @@ package body Simul.Annotations is
procedure Disp_Info (Info : Sim_Info_Acc)
is
- use Ada.Text_IO;
- Indent: Count;
+ use Simple_IO;
begin
- Indent := Col + 2;
- Set_Col (Indent);
if Info = null then
Put_Line ("*null*");
return;
@@ -1250,11 +1247,9 @@ package body Simul.Annotations is
& Object_Slot_Type'Image (Info.Nbr_Objects));
case Info.Kind is
when Kind_Block =>
- Set_Col (Indent);
- Put_Line ("inst_slot:"
+ Put ("inst_slot:"
& Instance_Slot_Type'Image (Info.Inst_Slot));
- Set_Col (Indent);
- Put_Line ("nbr instance:"
+ Put_Line (", nbr instance:"
& Instance_Slot_Type'Image (Info.Nbr_Instances));
when others =>
null;
diff --git a/src/vhdl/simulate/simul-debugger-ams.adb b/src/vhdl/simulate/simul-debugger-ams.adb
index adbb1df69..828e5bdbc 100644
--- a/src/vhdl/simulate/simul-debugger-ams.adb
+++ b/src/vhdl/simulate/simul-debugger-ams.adb
@@ -16,8 +16,8 @@
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
+with Simple_IO; use Simple_IO;
with Vhdl.Utils; use Vhdl.Utils;
-with Ada.Text_IO; use Ada.Text_IO;
with Vhdl.Disp_Vhdl;
package body Simul.Debugger.AMS is
diff --git a/src/vhdl/simulate/simul-debugger.adb b/src/vhdl/simulate/simul-debugger.adb
index d4bf1bce8..652828b19 100644
--- a/src/vhdl/simulate/simul-debugger.adb
+++ b/src/vhdl/simulate/simul-debugger.adb
@@ -17,7 +17,6 @@
-- 02111-1307, USA.
with System;
--- with Ada.Text_IO; use Ada.Text_IO;
with Tables;
with Types; use Types;
with Name_Table;
diff --git a/src/vhdl/simulate/simul-elaboration.adb b/src/vhdl/simulate/simul-elaboration.adb
index 05ea592e2..e1a418d6e 100644
--- a/src/vhdl/simulate/simul-elaboration.adb
+++ b/src/vhdl/simulate/simul-elaboration.adb
@@ -16,7 +16,7 @@
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
-with Ada.Text_IO;
+with Simple_IO;
with Str_Table;
with Errorout; use Errorout;
with Vhdl.Errors; use Vhdl.Errors;
@@ -2012,10 +2012,10 @@ package body Simul.Elaboration is
Sub_Conf : Iir;
begin
if Trace_Elaboration then
- Ada.Text_IO.Put ("configure component ");
- Ada.Text_IO.Put (Name_Table.Image (Get_Label (Stmt)));
- Ada.Text_IO.Put (": ");
- Ada.Text_IO.Put_Line (Image_Identifier (Component));
+ Simple_IO.Put ("configure component ");
+ Simple_IO.Put (Name_Table.Image (Get_Label (Stmt)));
+ Simple_IO.Put (": ");
+ Simple_IO.Put_Line (Image_Identifier (Component));
end if;
-- Elaboration of a component instantiation statement that instanciates
@@ -2030,7 +2030,7 @@ package body Simul.Elaboration is
end if;
if Trace_Elaboration then
- Ada.Text_IO.Put_Line
+ Simple_IO.Put_Line
(" using " & Disp_Node (Conf) & " from " & Disp_Location (Conf));
end if;
@@ -2821,10 +2821,10 @@ package body Simul.Elaboration is
Mark (Expr_Mark, Expr_Pool);
if Trace_Elaboration then
- Ada.Text_IO.Put ("elaborating ");
- Ada.Text_IO.Put (Image_Identifier (Arch));
- Ada.Text_IO.Put (" of ");
- Ada.Text_IO.Put_Line (Image_Identifier (Entity));
+ Simple_IO.Put ("elaborating ");
+ Simple_IO.Put (Image_Identifier (Arch));
+ Simple_IO.Put (" of ");
+ Simple_IO.Put_Line (Image_Identifier (Entity));
end if;
Instance := Create_Block_Instance (Parent_Instance, Arch, Stmt);
diff --git a/src/vhdl/simulate/simul-environments.adb b/src/vhdl/simulate/simul-environments.adb
index 7a722a53a..b30ef101a 100644
--- a/src/vhdl/simulate/simul-environments.adb
+++ b/src/vhdl/simulate/simul-environments.adb
@@ -18,8 +18,8 @@
with System;
with Ada.Unchecked_Conversion;
-with Ada.Text_IO;
with GNAT.Debug_Utilities;
+with Simple_IO;
with Name_Table;
with Simul.Debugger; use Simul.Debugger;
@@ -815,17 +815,15 @@ package body Simul.Environments is
end case;
end Get_Enum_Pos;
- procedure Put_Indent (Indent : Natural)
- is
- use Ada.Text_IO;
+ procedure Put_Indent (Indent : Natural) is
begin
- Put ((1 .. 2 * Indent => ' '));
+ Simple_IO.Put ((1 .. 2 * Indent => ' '));
end Put_Indent;
procedure Disp_Value_Tab (Value: Iir_Value_Literal_Acc;
Indent : Natural)
is
- use Ada.Text_IO;
+ use Simple_IO;
use GNAT.Debug_Utilities;
begin
Put_Indent (Indent);
@@ -976,7 +974,7 @@ package body Simul.Environments is
Dim: Iir_Index32;
Off : in out Iir_Index32)
is
- use Ada.Text_IO;
+ use Simple_IO;
type Last_Enum_Type is (None, Char, Identifier);
Last_Enum: Last_Enum_Type;
El_Type: Iir;
@@ -1056,7 +1054,7 @@ package body Simul.Environments is
procedure Disp_Iir_Value_Record
(Value: Iir_Value_Literal_Acc; A_Type: Iir)
is
- use Ada.Text_IO;
+ use Simple_IO;
List : constant Iir_Flist :=
Get_Elements_Declaration_List (Get_Base_Type (A_Type));
El : Iir_Element_Declaration;
@@ -1081,11 +1079,12 @@ package body Simul.Environments is
begin
Id := Get_Identifier
(Get_Nth_Element (Get_Enumeration_Literal_List (Bt), Pos));
- Ada.Text_IO.Put (Name_Table.Image (Id));
+ Simple_IO.Put (Name_Table.Image (Id));
end Disp_Iir_Value_Enum;
- procedure Disp_Iir_Value (Value: Iir_Value_Literal_Acc; A_Type: Iir) is
- use Ada.Text_IO;
+ procedure Disp_Iir_Value (Value: Iir_Value_Literal_Acc; A_Type: Iir)
+ is
+ use Simple_IO;
begin
if Value = null then
Put ("!NULL!");
diff --git a/src/vhdl/simulate/simul-execution.adb b/src/vhdl/simulate/simul-execution.adb
index 91b506e72..62a0d214e 100644
--- a/src/vhdl/simulate/simul-execution.adb
+++ b/src/vhdl/simulate/simul-execution.adb
@@ -16,9 +16,9 @@
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
-with Ada.Unchecked_Conversion;
-with Ada.Text_IO; use Ada.Text_IO;
with System;
+with Ada.Unchecked_Conversion;
+with Simple_IO; use Simple_IO;
with Types; use Types;
with Grt.Types; use Grt.Types;
with Flags; use Flags;
@@ -4250,33 +4250,33 @@ package body Simul.Execution is
-- The error message consists of at least:
-- 4: name of the design unit containing the assertion.
- Put (Standard_Output, Disp_Location (Stmt));
+ Put (Disp_Location (Stmt));
- Put (Standard_Output, ":@");
+ Put (":@");
Grt.Astdio.Vhdl.Put_Time (Grt.Stdio.stdout, Current_Time);
-- 1: an indication that this message is from an assertion.
- Put (Standard_Output, ":(");
- Put (Standard_Output, Msg);
- Put (Standard_Output, ' ');
+ Put (":(");
+ Put (Msg);
+ Put (' ');
-- 2: the value of the severity level.
case Severity is
when 0 =>
- Put (Standard_Output, "note");
+ Put ("note");
when 1 =>
- Put (Standard_Output, "warning");
+ Put ("warning");
when 2 =>
- Put (Standard_Output, "error");
+ Put ("error");
when 3 =>
- Put (Standard_Output, "failure");
+ Put ("failure");
when others =>
Error_Internal (Null_Iir, "execute_failed_assertion");
end case;
- Put (Standard_Output, "): ");
+ Put ("): ");
-- 3: the value of the message string.
- Put_Line (Standard_Output, Report);
+ Put_Line (Report);
-- Stop execution if the severity is too high.
if Severity >= Grt.Options.Severity_Level then
diff --git a/src/vhdl/simulate/simul-simulation-main.adb b/src/vhdl/simulate/simul-simulation-main.adb
index 41441ba06..25250706a 100644
--- a/src/vhdl/simulate/simul-simulation-main.adb
+++ b/src/vhdl/simulate/simul-simulation-main.adb
@@ -17,7 +17,7 @@
-- 02111-1307, USA.
with Ada.Unchecked_Conversion;
-with Ada.Text_IO; use Ada.Text_IO;
+with Simple_IO; use Simple_IO;
with Types; use Types;
with Vhdl.Utils; use Vhdl.Utils;
with Vhdl.Errors; use Vhdl.Errors;
@@ -196,9 +196,9 @@ package body Simul.Simulation.Main is
Marker : Mark_Type;
begin
if Trace_Drivers then
- Ada.Text_IO.Put ("Drivers for ");
+ Put ("Drivers for ");
Disp_Instance_Name (Instance);
- Ada.Text_IO.Put_Line (": " & Disp_Node (Proc));
+ Put_Line (": " & Disp_Node (Proc));
end if;
Driver_List := Trans_Analyzes.Extract_Drivers (Proc);
diff --git a/src/vhdl/translate/trans-chap7.adb b/src/vhdl/translate/trans-chap7.adb
index 9d1e0796c..3d670cf56 100644
--- a/src/vhdl/translate/trans-chap7.adb
+++ b/src/vhdl/translate/trans-chap7.adb
@@ -16,7 +16,7 @@
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
-with Ada.Text_IO;
+with Simple_IO;
with Name_Table;
with Str_Table;
with Vhdl.Utils; use Vhdl.Utils;
@@ -1132,10 +1132,7 @@ package body Trans.Chap7 is
Invert := True;
Val := 0;
when others =>
- Ada.Text_IO.Put_Line
- ("translate_shortcut_operator: cannot handle "
- & Iir_Predefined_Functions'Image (Kind));
- raise Internal_Error;
+ Error_Kind ("translate_shortcut_operator", Kind);
end case;
V := Get_Ortho_Literal
@@ -2334,7 +2331,7 @@ package body Trans.Chap7 is
| ON_Not =>
Res := New_Monadic_Op (Op, Left_Tree);
when others =>
- Ada.Text_IO.Put_Line
+ Simple_IO.Put_Line_Err
("translate_predefined_operator: cannot handle "
& ON_Op_Kind'Image (Op));
raise Internal_Error;
@@ -2747,11 +2744,7 @@ package body Trans.Chap7 is
end;
when others =>
- Ada.Text_IO.Put_Line
- ("translate_predefined_operator(2): cannot handle "
- & Iir_Predefined_Functions'Image (Kind));
- raise Internal_Error;
- return O_Enode_Null;
+ Error_Kind ("translate_predefined_operator(2)", Kind);
end case;
end Translate_Predefined_Operator;
diff --git a/src/vhdl/translate/trans-chap8.adb b/src/vhdl/translate/trans-chap8.adb
index d1bd4b085..83cfb0935 100644
--- a/src/vhdl/translate/trans-chap8.adb
+++ b/src/vhdl/translate/trans-chap8.adb
@@ -16,7 +16,7 @@
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
-with Ada.Text_IO;
+with Simple_IO;
with Std_Names;
with Vhdl.Errors; use Vhdl.Errors;
with Vhdl.Nodes_Utils;
@@ -2221,7 +2221,7 @@ package body Trans.Chap8 is
end;
when others =>
- Ada.Text_IO.Put_Line
+ Simple_IO.Put_Line_Err
("translate_implicit_procedure_call: cannot handle "
& Iir_Predefined_Functions'Image (Kind));
raise Internal_Error;
diff --git a/src/vhdl/translate/trans_analyzes.adb b/src/vhdl/translate/trans_analyzes.adb
index 8362938d8..2311b12eb 100644
--- a/src/vhdl/translate/trans_analyzes.adb
+++ b/src/vhdl/translate/trans_analyzes.adb
@@ -16,11 +16,11 @@
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
+with Errorout;
+with Simple_IO;
with Vhdl.Utils; use Vhdl.Utils;
with Vhdl.Nodes_Walk; use Vhdl.Nodes_Walk;
with Vhdl.Disp_Vhdl;
-with Ada.Text_IO;
-with Errorout;
with Vhdl.Errors; use Vhdl.Errors;
package body Trans_Analyzes is
@@ -230,7 +230,7 @@ package body Trans_Analyzes is
procedure Dump_Drivers (Proc : Iir; List : Iir_List)
is
- use Ada.Text_IO;
+ use Simple_IO;
use Errorout;
El : Iir;
It : List_Iterator;
diff --git a/src/vhdl/translate/trans_be.adb b/src/vhdl/translate/trans_be.adb
index de7078651..d4002cbcf 100644
--- a/src/vhdl/translate/trans_be.adb
+++ b/src/vhdl/translate/trans_be.adb
@@ -16,8 +16,8 @@
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
+with Simple_IO;
with Vhdl.Errors; use Vhdl.Errors;
-with Ada.Text_IO;
with Vhdl.Back_End;
package body Trans_Be is
@@ -63,7 +63,7 @@ package body Trans_Be is
procedure Disp_Option
is
- procedure P (Str : String) renames Ada.Text_IO.Put_Line;
+ procedure P (Str : String) renames Simple_IO.Put_Line;
begin
P (" --dump-drivers dump processes drivers");
end Disp_Option;