aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authortgingold <tgingold@users.noreply.github.com>2022-07-05 18:10:20 +0200
committerGitHub <noreply@github.com>2022-07-05 18:10:20 +0200
commitad14451e079b5762a3987ee0f15bbd0204308bd7 (patch)
tree698c47e45de6d69b671696e8c0036d8bcfaaf92f /testsuite
parent81bcef85ce7bdc91b32ab223253ff35b7b44c001 (diff)
parenta5ff910722bbe81d3c8e314732eceb14c72812af (diff)
downloadghdl-ad14451e079b5762a3987ee0f15bbd0204308bd7.tar.gz
ghdl-ad14451e079b5762a3987ee0f15bbd0204308bd7.tar.bz2
ghdl-ad14451e079b5762a3987ee0f15bbd0204308bd7.zip
Merge pull request #2127 from C-Elegans/to_ux01_unhandled_function
Fix issue #2126, add handling of to_ux01 to synthesis
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/synth/issue2126/test.vhdl19
-rwxr-xr-xtestsuite/synth/issue2126/testsuite.sh9
2 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/synth/issue2126/test.vhdl b/testsuite/synth/issue2126/test.vhdl
new file mode 100644
index 000000000..63de3d0df
--- /dev/null
+++ b/testsuite/synth/issue2126/test.vhdl
@@ -0,0 +1,19 @@
+-- Title : Testcase for to_ux01 on a std_logic
+-------------------------------------------------------------------------------
+
+library ieee;
+use ieee.std_logic_1164.all;
+entity test is
+
+ port (
+ sig_in : in std_logic_vector(1 downto 0);
+ sig_out : out std_logic;
+ sig_out_vec : out std_logic_vector(1 downto 0));
+end entity test;
+
+architecture str of test is
+
+begin -- architecture str
+ sig_out <= to_ux01(sig_in(0)) and to_ux01(sig_in(1));
+ sig_out_vec <= to_ux01(sig_in);
+end architecture str;
diff --git a/testsuite/synth/issue2126/testsuite.sh b/testsuite/synth/issue2126/testsuite.sh
new file mode 100755
index 000000000..75ca5f68d
--- /dev/null
+++ b/testsuite/synth/issue2126/testsuite.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+GHDL_STD_FLAGS=--std=08
+
+synth_only test
+
+echo "Test successful"