diff options
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/gna/issue1300/testsuite.sh | 6 | ||||
-rw-r--r-- | testsuite/gna/issue1300/wishbone_types_err2.vhdl | 20 |
2 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/gna/issue1300/testsuite.sh b/testsuite/gna/issue1300/testsuite.sh index ec021a312..b5b72bdd9 100755 --- a/testsuite/gna/issue1300/testsuite.sh +++ b/testsuite/gna/issue1300/testsuite.sh @@ -3,9 +3,15 @@ . ../../testenv.sh export GHDL_STD_FLAGS=--std=08 + analyze wishbone_types.vhdl icache.vhdl elab_simulate icache clean +analyze wishbone_types_err2.vhdl icache.vhdl +elab_simulate icache + +clean + echo "Test successful" diff --git a/testsuite/gna/issue1300/wishbone_types_err2.vhdl b/testsuite/gna/issue1300/wishbone_types_err2.vhdl new file mode 100644 index 000000000..3111ab266 --- /dev/null +++ b/testsuite/gna/issue1300/wishbone_types_err2.vhdl @@ -0,0 +1,20 @@ +package wishbone_types is + type wb_slave_out_t is record + dat : bit_vector; + ack : bit; + stall : bit; + end record; + + -- Common subtypes + constant wb_cpu_data_bits : integer := 64; + subtype wb_cpu_in_t is wb_slave_out_t(dat(wb_cpu_data_bits-1 downto 0)); + + -- GHDL: Works +-- subtype wishbone_slave_out is wb_slave_out_t(dat(wb_cpu_data_bits-1 downto 0)); + + -- GHDL: Breaks + subtype wishbone_slave_out is wb_cpu_in_t; + + type wishbone_slave_out_vector is + array (natural range <>) of wb_cpu_in_t; +end package wishbone_types; |