aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-07-20 19:30:39 +0200
committerTristan Gingold <tgingold@free.fr>2022-07-20 19:30:39 +0200
commit158b4c6fd957b77dfcc01e7a89cca5b8bad277d8 (patch)
tree41cc89f03ef61ee9905199861259c38a95d4959a /src
parentb11ff2745c951f5beaa8e0eb06dd367a9341f18d (diff)
downloadghdl-158b4c6fd957b77dfcc01e7a89cca5b8bad277d8.tar.gz
ghdl-158b4c6fd957b77dfcc01e7a89cca5b8bad277d8.tar.bz2
ghdl-158b4c6fd957b77dfcc01e7a89cca5b8bad277d8.zip
elab-vhdl_debug: disp fp64 values
Diffstat (limited to 'src')
-rw-r--r--src/synth/elab-vhdl_debug.adb2
-rw-r--r--src/synth/elab-vhdl_values-debug.adb3
-rw-r--r--src/utils_io.adb5
-rw-r--r--src/utils_io.ads2
4 files changed, 10 insertions, 2 deletions
diff --git a/src/synth/elab-vhdl_debug.adb b/src/synth/elab-vhdl_debug.adb
index ea7736193..75132f49c 100644
--- a/src/synth/elab-vhdl_debug.adb
+++ b/src/synth/elab-vhdl_debug.adb
@@ -193,7 +193,7 @@ package body Elab.Vhdl_Debug is
when Type_Array =>
Disp_Value_Array (M, Vtype);
when Type_Float =>
- Put ("*float*");
+ Put_Fp64 (Read_Fp64 (M));
when Type_Slice =>
Put ("*slice*");
when Type_File =>
diff --git a/src/synth/elab-vhdl_values-debug.adb b/src/synth/elab-vhdl_values-debug.adb
index bd174f6b0..0466bcde2 100644
--- a/src/synth/elab-vhdl_values-debug.adb
+++ b/src/synth/elab-vhdl_values-debug.adb
@@ -265,7 +265,8 @@ package body Elab.Vhdl_Values.Debug is
when Type_File =>
Put ("file");
when Type_Float =>
- Put ("float");
+ Put ("float: ");
+ Put_Fp64 (Read_Fp64 (M.Mem));
when Type_Slice =>
Put ("slice");
when Type_Unbounded_Vector =>
diff --git a/src/utils_io.adb b/src/utils_io.adb
index 78b9a9d7b..1b5f0ff71 100644
--- a/src/utils_io.adb
+++ b/src/utils_io.adb
@@ -49,6 +49,11 @@ package body Utils_IO is
Put_Trim (Int64'Image (V));
end Put_Int64;
+ procedure Put_Fp64 (V : Fp64) is
+ begin
+ Put_Trim (Fp64'Image (V));
+ end Put_Fp64;
+
Hex_Map : constant array (0 .. 15) of Character := "0123456789ABCDEF";
procedure Put_Addr (V : System.Address)
diff --git a/src/utils_io.ads b/src/utils_io.ads
index a99d52c3c..3843c9770 100644
--- a/src/utils_io.ads
+++ b/src/utils_io.ads
@@ -30,5 +30,7 @@ package Utils_IO is
procedure Put_Int32 (V : Int32);
procedure Put_Int64 (V : Int64);
+ procedure Put_Fp64 (V : Fp64);
+
procedure Put_Addr (V : System.Address);
end Utils_IO;