aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue2126
diff options
context:
space:
mode:
authorMichael Nolan <mtnolan2640@gmail.com>2022-07-05 09:01:24 -0400
committerMichael Nolan <mtnolan2640@gmail.com>2022-07-05 09:01:24 -0400
commita5ff910722bbe81d3c8e314732eceb14c72812af (patch)
tree698c47e45de6d69b671696e8c0036d8bcfaaf92f /testsuite/synth/issue2126
parent81bcef85ce7bdc91b32ab223253ff35b7b44c001 (diff)
downloadghdl-a5ff910722bbe81d3c8e314732eceb14c72812af.tar.gz
ghdl-a5ff910722bbe81d3c8e314732eceb14c72812af.tar.bz2
ghdl-a5ff910722bbe81d3c8e314732eceb14c72812af.zip
Fix issue #2126, add handling of to_ux01 to synthesis
Diffstat (limited to 'testsuite/synth/issue2126')
-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"