-
-
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.
Add runtime checks for negative delays. Issue #633
- Loading branch information
Showing
7 changed files
with
69 additions
and
13 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 @@ | ||
1ns+0: illegal negative delay -10 ps |
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,2 @@ | ||
6ns+0: illegal negative delay -3600000 ms | ||
|
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,17 @@ | ||
entity signal29 is | ||
end entity; | ||
|
||
architecture test of signal29 is | ||
signal x : integer; | ||
begin | ||
|
||
p1: process is | ||
variable delay : time; | ||
begin | ||
delay := -10 ps; | ||
wait for 1 ns; | ||
x <= 1, 2 after delay; | ||
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 |
---|---|---|
|
@@ -729,3 +729,5 @@ const10 normal | |
null3 normal | ||
link4 normal | ||
predef3 normal | ||
wait26 fail,gold | ||
signal29 fail,gold |
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,19 @@ | ||
entity wait26 is | ||
end entity; | ||
|
||
architecture test of wait26 is | ||
begin | ||
|
||
p1: process is | ||
variable delay : time; | ||
begin | ||
delay := 5 ns; | ||
wait for delay; | ||
assert now = 5 ns; | ||
delay := -1 hr; | ||
wait for 1 ns; | ||
wait for delay; -- Error | ||
wait; | ||
end process; | ||
|
||
end architecture; |