diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-11-04 20:41:57 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-11-04 20:41:57 +0100 |
commit | 73e03cbc9b07dbc1bfc75be3baf8fd9fc66e32d8 (patch) | |
tree | 7d6158b3a194ee5b24e87cc55a3cac911c97d9fb /testsuite/issues | |
parent | 6efbb986ae874f2e0abf79041d12bc8fa073e993 (diff) | |
download | ghdl-yosys-plugin-73e03cbc9b07dbc1bfc75be3baf8fd9fc66e32d8.tar.gz ghdl-yosys-plugin-73e03cbc9b07dbc1bfc75be3baf8fd9fc66e32d8.tar.bz2 ghdl-yosys-plugin-73e03cbc9b07dbc1bfc75be3baf8fd9fc66e32d8.zip |
Add testcase for #68
Diffstat (limited to 'testsuite/issues')
-rw-r--r-- | testsuite/issues/issue68/demux.vhdl | 23 | ||||
-rwxr-xr-x | testsuite/issues/issue68/testsuite.sh | 8 |
2 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/issues/issue68/demux.vhdl b/testsuite/issues/issue68/demux.vhdl new file mode 100644 index 0000000..936a38d --- /dev/null +++ b/testsuite/issues/issue68/demux.vhdl @@ -0,0 +1,23 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity demux is port ( + j : in integer range 0 to 3; + k : in std_logic; + l : in std_logic; + y : out std_logic_vector(1 to 5)); +end demux; + +architecture beh of demux is + + function to_slv(C:integer; B:std_logic; E:std_logic) return std_logic_vector is + variable ret : std_logic_vector(1 to 5) := (others => '0'); + begin + ret(C+1) := E; + ret(5) := B; + + return ret; + end to_slv; +begin + y <= to_slv(j, k, l); +end beh; diff --git a/testsuite/issues/issue68/testsuite.sh b/testsuite/issues/issue68/testsuite.sh new file mode 100755 index 0000000..9348be4 --- /dev/null +++ b/testsuite/issues/issue68/testsuite.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +topdir=../.. +. $topdir/testenv.sh + +synth "demux.vhdl -e" + +clean |