-
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimise code generation for protected procedure calls
- Loading branch information
Showing
7 changed files
with
79 additions
and
18 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
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 @@ | ||
0ms+0: cannot wait inside call to protected type method |
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,56 @@ | ||
entity protected11 is | ||
end entity; | ||
|
||
architecture test of protected11 is | ||
|
||
procedure do_something; | ||
procedure do_wait; | ||
|
||
type pt is protected | ||
procedure proc; | ||
end protected; | ||
|
||
type pt is protected body | ||
variable count : natural; | ||
|
||
procedure proc(arg : integer); | ||
|
||
procedure proc is | ||
begin | ||
count := count + 1; | ||
assert count = 1; | ||
proc(5); | ||
assert count = 2; | ||
proc(-1); | ||
end procedure; | ||
|
||
procedure proc(arg : integer) is | ||
begin | ||
count := count + 1; | ||
do_something; | ||
if arg < 0 then | ||
do_wait; -- Error | ||
end if; | ||
end procedure; | ||
|
||
end protected body; | ||
|
||
procedure do_something is | ||
begin | ||
end procedure; | ||
|
||
procedure do_wait is | ||
begin | ||
wait for 1 ns; | ||
end procedure; | ||
|
||
shared variable v : pt; | ||
begin | ||
|
||
tb: process is | ||
begin | ||
v.proc; | ||
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
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