diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-04-20 07:49:03 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-04-20 12:19:48 +0200 |
commit | cb72a1834f160d95d026b7e466886fd95fd82146 (patch) | |
tree | 87cd0fff5a8ce03b05b8e6a0a0129b60de90fe61 /src/vhdl/simulate/simul-environments.adb | |
parent | b6d42a577f4ee5f2084a165b0cdf66cadcc878a1 (diff) | |
download | ghdl-cb72a1834f160d95d026b7e466886fd95fd82146.tar.gz ghdl-cb72a1834f160d95d026b7e466886fd95fd82146.tar.bz2 ghdl-cb72a1834f160d95d026b7e466886fd95fd82146.zip |
types: introduce Direction_Type, which replaces Iir_Direction.
Global renaming.
Diffstat (limited to 'src/vhdl/simulate/simul-environments.adb')
-rw-r--r-- | src/vhdl/simulate/simul-environments.adb | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/src/vhdl/simulate/simul-environments.adb b/src/vhdl/simulate/simul-environments.adb index 356383bba..221e812d7 100644 --- a/src/vhdl/simulate/simul-environments.adb +++ b/src/vhdl/simulate/simul-environments.adb @@ -19,7 +19,7 @@ with System; with Ada.Unchecked_Conversion; with GNAT.Debug_Utilities; -with Types; use Types; + with Simple_IO; with Name_Table; with Simul.Debugger; use Simul.Debugger; @@ -207,9 +207,9 @@ package body Simul.Environments is begin Cmp := Compare_Value (Arange.Left, Arange.Right); case Arange.Dir is - when Iir_To => + when Dir_To => return Cmp = Greater; - when Iir_Downto => + when Dir_Downto => return Cmp = Less; end case; end Is_Null_Range; @@ -462,22 +462,20 @@ package body Simul.Environments is (Kind => Iir_Value_Access, Val_Access => Val))); end Create_Access_Value; - function Create_Range_Value - (Left, Right : Iir_Value_Literal_Acc; - Dir : Iir_Direction; - Length : Iir_Index32) - return Iir_Value_Literal_Acc + function Create_Range_Value (Left, Right : Iir_Value_Literal_Acc; + Dir : Direction_Type; + Length : Iir_Index32) + return Iir_Value_Literal_Acc is subtype Range_Value is Iir_Value_Literal (Iir_Value_Range); function Alloc is new Alloc_On_Pool_Addr (Range_Value); begin - return To_Iir_Value_Literal_Acc - (Alloc (Current_Pool, - (Kind => Iir_Value_Range, - Left => Left, - Right => Right, - Dir => Dir, - Length => Length))); + return To_Iir_Value_Literal_Acc (Alloc (Current_Pool, + (Kind => Iir_Value_Range, + Left => Left, + Right => Right, + Dir => Dir, + Length => Length))); end Create_Range_Value; function Create_File_Value (Val : Grt.Files.Ghdl_File_Index) @@ -492,19 +490,18 @@ package body Simul.Environments is end Create_File_Value; -- Create a range_value of life LIFE. - function Create_Range_Value - (Left, Right : Iir_Value_Literal_Acc; - Dir : Iir_Direction) - return Iir_Value_Literal_Acc + function Create_Range_Value (Left, Right : Iir_Value_Literal_Acc; + Dir : Direction_Type) + return Iir_Value_Literal_Acc is Low, High : Iir_Value_Literal_Acc; Len : Iir_Index32; begin case Dir is - when Iir_To => + when Dir_To => Low := Left; High := Right; - when Iir_Downto => + when Dir_Downto => Low := Right; High := Left; end case; @@ -891,7 +888,7 @@ package body Simul.Environments is Put_Line ("range:"); Put_Indent (Indent); Put (" direction: "); - Put (Iir_Direction'Image (Value.Dir)); + Put (Direction_Type'Image (Value.Dir)); Put (", length:"); Put_Line (Iir_Index32'Image (Value.Length)); if Value.Left /= null then |