From 4b16ef4c7c491590a5a3cd80e7bff3233471e674 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 10 Aug 2018 07:21:05 +0200 Subject: Add testcase for #561 --- testsuite/gna/issue561/testsuite.sh | 18 +++++++++++++++ testsuite/gna/issue561/wb_demux.vhd | 17 ++++++++++++++ testsuite/gna/issue561/wb_demux_tb.vhd | 33 ++++++++++++++++++++++++++++ testsuite/gna/issue561/wishbone_pkg-2008.vhd | 18 +++++++++++++++ 4 files changed, 86 insertions(+) create mode 100755 testsuite/gna/issue561/testsuite.sh create mode 100644 testsuite/gna/issue561/wb_demux.vhd create mode 100644 testsuite/gna/issue561/wb_demux_tb.vhd create mode 100644 testsuite/gna/issue561/wishbone_pkg-2008.vhd (limited to 'testsuite/gna/issue561') 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; -- cgit v1.2.3