diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-05-19 18:52:54 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-05-19 20:34:12 +0200 |
commit | bf6e695a130c85a6c17b543329831dd09ae40457 (patch) | |
tree | 9df2304660ae728bec48ece470f4d0a31d332351 /src/vhdl/simulate | |
parent | fa5614efb63cacdee5bb93ce88e8ce07f3a10f77 (diff) | |
download | ghdl-bf6e695a130c85a6c17b543329831dd09ae40457.tar.gz ghdl-bf6e695a130c85a6c17b543329831dd09ae40457.tar.bz2 ghdl-bf6e695a130c85a6c17b543329831dd09ae40457.zip |
Add simple_IO - to be used instead of Text_IO.
Diffstat (limited to 'src/vhdl/simulate')
-rw-r--r-- | src/vhdl/simulate/simul-annotations.adb | 15 | ||||
-rw-r--r-- | src/vhdl/simulate/simul-debugger-ams.adb | 2 | ||||
-rw-r--r-- | src/vhdl/simulate/simul-debugger.adb | 1 | ||||
-rw-r--r-- | src/vhdl/simulate/simul-elaboration.adb | 20 | ||||
-rw-r--r-- | src/vhdl/simulate/simul-environments.adb | 21 | ||||
-rw-r--r-- | src/vhdl/simulate/simul-execution.adb | 26 | ||||
-rw-r--r-- | src/vhdl/simulate/simul-simulation-main.adb | 6 |
7 files changed, 42 insertions, 49 deletions
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); |