-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash with signal alias in generic package. Fixes #946
- Loading branch information
Showing
4 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package pack is | ||
generic ( width : natural ); | ||
type t_rec is record | ||
f : integer_vector(1 to width); | ||
end record; | ||
signal s : t_rec; | ||
alias a is s.f; | ||
procedure get (index : positive; result : out integer); | ||
end package; | ||
|
||
package body pack is | ||
procedure get (index : positive; result : out integer) is | ||
begin | ||
result := a(index); | ||
end procedure; | ||
end package body; | ||
|
||
------------------------------------------------------------------------------- | ||
|
||
entity issue946 is | ||
end entity; | ||
|
||
architecture test of issue946 is | ||
package pack6 is new work.pack generic map ( 3 ); | ||
use pack6.all; | ||
begin | ||
|
||
check: process is | ||
variable result : integer; | ||
begin | ||
a <= (1, 2, 3); | ||
wait for 0 ns; | ||
for i in 1 to 3 loop | ||
get(i, result); | ||
assert result = i; | ||
end loop; | ||
wait; | ||
end process; | ||
|
||
end architecture; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1023,3 +1023,4 @@ issue943 normal,2008 | |
mixed3 mixed | ||
vlog10 verilog | ||
vlog11 verilog | ||
issue946 normal,2008 |