aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/synth108
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/synth/synth108')
-rw-r--r--testsuite/synth/synth108/mwe.vhdl20
-rwxr-xr-xtestsuite/synth/synth108/testsuite.sh8
2 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/synth/synth108/mwe.vhdl b/testsuite/synth/synth108/mwe.vhdl
new file mode 100644
index 000000000..af286bc9e
--- /dev/null
+++ b/testsuite/synth/synth108/mwe.vhdl
@@ -0,0 +1,20 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+entity MWE is
+
+ port (
+ a : in std_logic_vector(0 to 3);
+ b : in std_logic_vector(0 to 3);
+ sel : in std_logic_vector(0 to 1);
+ o : out std_logic_vector(0 to 1)
+ );
+end MWE;
+
+architecture behavioral of MWE is
+ signal cnt : integer range 0 to 1;
+begin
+ cnt <= to_integer(unsigned(sel));
+ o <= a(cnt*o'length to (cnt + 1)*o'length - 1) xor b(cnt*o'length to (cnt + 1)*o'length - 1);
+end architecture behavioral;
diff --git a/testsuite/synth/synth108/testsuite.sh b/testsuite/synth/synth108/testsuite.sh
new file mode 100755
index 000000000..62b57fc6a
--- /dev/null
+++ b/testsuite/synth/synth108/testsuite.sh
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+synth_analyze mwe
+clean
+
+echo "Test successful"