aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-09-01 20:33:36 +0200
committerTristan Gingold <tgingold@free.fr>2022-09-02 02:31:07 +0200
commita259712ccb53a2b59fc66e01646db9ce95167ab1 (patch)
treee2b32f00c74f4b99a52c94fcfabad6baa28ec1db /testsuite/synth
parent21259ac719911175ea0cb3601cc2423de8fed755 (diff)
downloadghdl-a259712ccb53a2b59fc66e01646db9ce95167ab1.tar.gz
ghdl-a259712ccb53a2b59fc66e01646db9ce95167ab1.tar.bz2
ghdl-a259712ccb53a2b59fc66e01646db9ce95167ab1.zip
testsuite/synth: improve test #1460
Diffstat (limited to 'testsuite/synth')
-rwxr-xr-xtestsuite/synth/issue1460/testsuite.sh1
-rw-r--r--testsuite/synth/issue1460/to01_float.vhdl17
2 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/synth/issue1460/testsuite.sh b/testsuite/synth/issue1460/testsuite.sh
index a0520d8bb..b3b2efd6c 100755
--- a/testsuite/synth/issue1460/testsuite.sh
+++ b/testsuite/synth/issue1460/testsuite.sh
@@ -8,6 +8,7 @@ for t in leftmost01 leftmost02 leftmost03 rightmost01 rightmost02; do
synth_tb $t
done
+synth_analyze to01_float
synth_analyze division_float
echo "Test successful"
diff --git a/testsuite/synth/issue1460/to01_float.vhdl b/testsuite/synth/issue1460/to01_float.vhdl
new file mode 100644
index 000000000..234438e71
--- /dev/null
+++ b/testsuite/synth/issue1460/to01_float.vhdl
@@ -0,0 +1,17 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+use ieee.float_pkg.all;
+
+entity to01_float is
+port(
+i0 : in float (7 downto -6);
+p0 : out float (7 downto -6));
+end to01_float ;
+
+architecture arch1 of to01_float is
+
+begin
+-- p0 <= to_01(i0);
+ p0 <= UNRESOLVED_float (STD_LOGIC_VECTOR(to_01(UNSIGNED(to_sulv(i0)))));
+end arch1;