Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic test of multidimensional array signals
- Loading branch information
Showing
2 changed files
with
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
entity array3 is | ||
end entity; | ||
|
||
architecture test of array3 is | ||
type matrix2x4 is array (1 to 2, 1 to 4) of integer; | ||
signal m : matrix2x4; | ||
begin | ||
|
||
process is | ||
begin | ||
assert m(2, 2) = integer'left; | ||
m(2, 2) <= 5; | ||
wait for 1 ns; | ||
assert m(2, 2) = 5; | ||
m(2, 3) <= m(2, 2); | ||
wait for 1 ns; | ||
assert m(2, 3) = 5; | ||
|
||
m <= ( (1, 2, 3, 4), | ||
(5, 6, 7, 8) ); | ||
wait for 1 ns; | ||
assert m(2, 4) = 8; | ||
|
||
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 |
---|---|---|
|
@@ -170,3 +170,4 @@ elab17 normal | |
null2 normal | ||
func13 normal | ||
proc10 normal | ||
array3 normal |