diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-01-21 08:21:22 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-01-21 08:21:22 +0100 |
commit | c4664ffedd313ec06ca212034e2a55d7aa148b64 (patch) | |
tree | 909e2c7581de2ea1d8ddd47a24cad8a89baa4e52 /testsuite/gna/issue520/alias.vhdl | |
parent | f48c076a60081aab16b432bc35da5664a80a2487 (diff) | |
download | ghdl-c4664ffedd313ec06ca212034e2a55d7aa148b64.tar.gz ghdl-c4664ffedd313ec06ca212034e2a55d7aa148b64.tar.bz2 ghdl-c4664ffedd313ec06ca212034e2a55d7aa148b64.zip |
Add reproducer for issue520.
Diffstat (limited to 'testsuite/gna/issue520/alias.vhdl')
-rw-r--r-- | testsuite/gna/issue520/alias.vhdl | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/testsuite/gna/issue520/alias.vhdl b/testsuite/gna/issue520/alias.vhdl new file mode 100644 index 000000000..9b1d98c56 --- /dev/null +++ b/testsuite/gna/issue520/alias.vhdl @@ -0,0 +1,41 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity alias_extname_driving_signal is + port( + clk : in std_logic + ); +end alias_extname_driving_signal; + +architecture primary of alias_extname_driving_signal is + signal counter : unsigned(15 downto 0) := (others => '0'); +begin + counter <= (counter + 1) when rising_edge(clk); +end architecture primary; + + +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity alias_tb is +end alias_tb; + +architecture primary of alias_tb is + signal clk : std_logic := '0'; + signal vector16 : unsigned(15 downto 0); +begin + clk <= not clk after 10 ns; + + uut : entity work.alias_extname_driving_signal + port map( + clk => clk + ); + + blk: block + alias counter_alias is << signal .alias_tb.uut.counter : unsigned(15 downto 0) >>; + begin + vector16 <= counter_alias; + end block; +end architecture primary; |