diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-05-12 07:44:23 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-05-12 08:10:36 +0200 |
commit | 1ca3be1b3277742e2a636b2d6f8335126d37223c (patch) | |
tree | 0118fc438a093bd602348d69ab30a7d5733a5999 | |
parent | 5048285e1681142b68670149e8d0806685bc118e (diff) | |
download | ghdl-1ca3be1b3277742e2a636b2d6f8335126d37223c.tar.gz ghdl-1ca3be1b3277742e2a636b2d6f8335126d37223c.tar.bz2 ghdl-1ca3be1b3277742e2a636b2d6f8335126d37223c.zip |
testsuite/gna: add a test for #1300
-rw-r--r-- | testsuite/gna/issue1300/icache.vhdl | 16 | ||||
-rwxr-xr-x | testsuite/gna/issue1300/testsuite.sh | 11 | ||||
-rw-r--r-- | testsuite/gna/issue1300/wishbone_types.vhdl | 17 |
3 files changed, 44 insertions, 0 deletions
diff --git a/testsuite/gna/issue1300/icache.vhdl b/testsuite/gna/issue1300/icache.vhdl new file mode 100644 index 000000000..fed20e4a5 --- /dev/null +++ b/testsuite/gna/issue1300/icache.vhdl @@ -0,0 +1,16 @@ +library work; +use work.wishbone_types.all; + +entity icache is + port ( + clk : in bit; + rst : in bit; + +-- wishbone_in : in wb_cpu_in_t + wishbone_in : in wishbone_slave_out + ); +end entity icache; + +architecture rtl of icache is +begin +end; diff --git a/testsuite/gna/issue1300/testsuite.sh b/testsuite/gna/issue1300/testsuite.sh new file mode 100755 index 000000000..ec021a312 --- /dev/null +++ b/testsuite/gna/issue1300/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze wishbone_types.vhdl icache.vhdl +elab_simulate icache + +clean + +echo "Test successful" diff --git a/testsuite/gna/issue1300/wishbone_types.vhdl b/testsuite/gna/issue1300/wishbone_types.vhdl new file mode 100644 index 000000000..092e8c2aa --- /dev/null +++ b/testsuite/gna/issue1300/wishbone_types.vhdl @@ -0,0 +1,17 @@ +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; +end package wishbone_types; |