-
-
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.
Checking for VHDL-2019 pointers-to-protected-types
- Loading branch information
Showing
6 changed files
with
153 additions
and
34 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,42 @@ | ||
entity lcs2016_014a is | ||
end entity; | ||
|
||
architecture test of lcs2016_014a is | ||
type pt is protected | ||
procedure proc; | ||
function func (x : integer := 2) return integer; | ||
end protected; | ||
|
||
type pt is protected body | ||
procedure proc is | ||
begin | ||
end procedure; | ||
function func (x : integer := 2) return integer is | ||
begin | ||
return x; | ||
end function; | ||
end protected body; | ||
|
||
type ptp is access pt; -- OK | ||
type ft is file of natural; -- OK | ||
type ftp is access ft; -- OK | ||
|
||
-- TODO: additions re. generic protected types | ||
begin | ||
|
||
p1: process is | ||
variable sv : ptp; -- OK | ||
variable v : pt; | ||
begin | ||
assert sv = null; -- OK | ||
sv := new pt; -- OK | ||
sv.all.proc; -- OK | ||
sv.proc; -- OK | ||
sv.all.all.proc; -- Error | ||
assert sv.all.func = 2; -- OK | ||
assert sv.func(5) = 2; -- OK | ||
sv := new pt'(sv.all); -- Error (?) | ||
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