diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-08-10 07:21:05 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-08-10 09:47:29 +0200 |
commit | 4b16ef4c7c491590a5a3cd80e7bff3233471e674 (patch) | |
tree | 2fb9938265694a3ce883d88fd277a8e2b01828d4 /testsuite/gna/issue561 | |
parent | 5e067ef4be27678ed9998911b3a1388c229b52f1 (diff) | |
download | ghdl-4b16ef4c7c491590a5a3cd80e7bff3233471e674.tar.gz ghdl-4b16ef4c7c491590a5a3cd80e7bff3233471e674.tar.bz2 ghdl-4b16ef4c7c491590a5a3cd80e7bff3233471e674.zip |
Add testcase for #561
Diffstat (limited to 'testsuite/gna/issue561')
-rwxr-xr-x | testsuite/gna/issue561/testsuite.sh | 18 | ||||
-rw-r--r-- | testsuite/gna/issue561/wb_demux.vhd | 17 | ||||
-rw-r--r-- | testsuite/gna/issue561/wb_demux_tb.vhd | 33 | ||||
-rw-r--r-- | testsuite/gna/issue561/wishbone_pkg-2008.vhd | 18 |
4 files changed, 86 insertions, 0 deletions
diff --git a/testsuite/gna/issue561/testsuite.sh b/testsuite/gna/issue561/testsuite.sh new file mode 100755 index 000000000..ed620bfdd --- /dev/null +++ b/testsuite/gna/issue561/testsuite.sh @@ -0,0 +1,18 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze wishbone_pkg-2008.vhd +analyze wb_demux.vhd +analyze wb_demux_tb.vhd +elab wb_demux_tb +if ghdl_has_feature wb_demux_tb ghw; then + simulate wb_demux_tb --wave=w.ghw +fi + +rm -f w.ghw + +clean + +echo "Test successful" diff --git a/testsuite/gna/issue561/wb_demux.vhd b/testsuite/gna/issue561/wb_demux.vhd new file mode 100644 index 000000000..d293137c8 --- /dev/null +++ b/testsuite/gna/issue561/wb_demux.vhd @@ -0,0 +1,17 @@ +library IEEE; +use IEEE.STD_LOGIC_1164.ALL; +--use IEEE.NUMERIC_STD.ALL; + +library work; +use work.wishbone_pkg.all; + +entity wb_demux is + Port ( + wbs_i : in t_wishbone_slave_in + ); +end wb_demux; +architecture full_regs of wb_demux is +begin + + +end full_regs; diff --git a/testsuite/gna/issue561/wb_demux_tb.vhd b/testsuite/gna/issue561/wb_demux_tb.vhd new file mode 100644 index 000000000..46e121777 --- /dev/null +++ b/testsuite/gna/issue561/wb_demux_tb.vhd @@ -0,0 +1,33 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +library work; +use work.wishbone_pkg.all; + +entity wb_demux_tb is +end entity; + +architecture bench of wb_demux_tb is + + signal wbs_i : t_wishbone_slave_in( + dat(32-1 downto 0) + ); + +begin + + stimulus : process + begin + wbs_i.dat <= x"deadbeef"; + wait for 100 ns; + report "pass" severity note; + wait; + end process; + + dut : entity work.wb_demux + port map ( + wbs_i => wbs_i + ); + + +end architecture; diff --git a/testsuite/gna/issue561/wishbone_pkg-2008.vhd b/testsuite/gna/issue561/wishbone_pkg-2008.vhd new file mode 100644 index 000000000..c4b5c1ef2 --- /dev/null +++ b/testsuite/gna/issue561/wishbone_pkg-2008.vhd @@ -0,0 +1,18 @@ +library ieee; +use ieee.std_logic_1164.all; + +package wishbone_pkg is + +--./wb_demux_tb:internal error: waves.write_types: unhandled obj kind +type t_wishbone_slave_in is record + dat : std_logic_vector; +end record; + + +--./wb_demux_tb:internal error: wave.create_type +--type t_wishbone_master_out is record +-- dat : std_logic_vector; +--end record; +--subtype t_wishbone_slave_in is t_wishbone_master_out; + +end wishbone_pkg; |