aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-05-16 04:34:01 +0200
committerTristan Gingold <tgingold@free.fr>2022-05-16 04:34:01 +0200
commit4803449d989b50284ac51b6190dc4bc0c594a498 (patch)
tree9136f8f2c051371111fe8446f0c52fdb23725078 /src/synth
parent721d166110bd39b067aa064ebe8c7bf6f514effc (diff)
downloadghdl-4803449d989b50284ac51b6190dc4bc0c594a498.tar.gz
ghdl-4803449d989b50284ac51b6190dc4bc0c594a498.tar.bz2
ghdl-4803449d989b50284ac51b6190dc4bc0c594a498.zip
elab-vhdl_debug: factorize code, make Put_Dir public
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/elab-vhdl_debug.adb15
-rw-r--r--src/synth/elab-vhdl_values-debug.ads3
2 files changed, 6 insertions, 12 deletions
diff --git a/src/synth/elab-vhdl_debug.adb b/src/synth/elab-vhdl_debug.adb
index 7efe9a175..b8c8d39d3 100644
--- a/src/synth/elab-vhdl_debug.adb
+++ b/src/synth/elab-vhdl_debug.adb
@@ -24,6 +24,7 @@ with Libraries;
with Elab.Debugger;
with Elab.Memtype; use Elab.Memtype;
with Elab.Vhdl_Values; use Elab.Vhdl_Values;
+with Elab.Vhdl_Values.Debug; use Elab.Vhdl_Values.Debug;
with Vhdl.Utils; use Vhdl.Utils;
with Vhdl.Errors;
@@ -203,21 +204,11 @@ package body Elab.Vhdl_Debug is
end case;
end Disp_Value;
- procedure Disp_Direction (Dir : Direction_Type) is
- begin
- case Dir is
- when Dir_To =>
- Put ("to");
- when Dir_Downto =>
- Put ("downto");
- end case;
- end Disp_Direction;
-
procedure Disp_Bound_Type (Bound : Bound_Type) is
begin
Put_Int32 (Bound.Left);
Put (' ');
- Disp_Direction (Bound.Dir);
+ Put_Dir (Bound.Dir);
Put (' ');
Put_Int32 (Bound.Right);
end Disp_Bound_Type;
@@ -226,7 +217,7 @@ package body Elab.Vhdl_Debug is
begin
Disp_Discrete_Value (Rng.Left, Vtype);
Put (' ');
- Disp_Direction (Rng.Dir);
+ Put_Dir (Rng.Dir);
Put (' ');
Disp_Discrete_Value (Rng.Right, Vtype);
end Disp_Discrete_Range;
diff --git a/src/synth/elab-vhdl_values-debug.ads b/src/synth/elab-vhdl_values-debug.ads
index 000cd59c5..026625c76 100644
--- a/src/synth/elab-vhdl_values-debug.ads
+++ b/src/synth/elab-vhdl_values-debug.ads
@@ -23,4 +23,7 @@ package Elab.Vhdl_Values.Debug is
-- Short description, no newline.
procedure Debug_Type_Short (T : Type_Acc);
+
+ -- Display 'to' or 'downto'.
+ procedure Put_Dir (Dir : Direction_Type);
end Elab.Vhdl_Values.Debug;