Skip to content

Commit

Permalink
Add basic test of multidimensional array signals
Browse files Browse the repository at this point in the history
  • Loading branch information
nickg committed Nov 2, 2013
1 parent bfe4a1f commit 1524c98
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/regress/array3.vhd
@@ -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;
1 change: 1 addition & 0 deletions test/regress/testlist.txt
Expand Up @@ -170,3 +170,4 @@ elab17 normal
null2 normal
func13 normal
proc10 normal
array3 normal

0 comments on commit 1524c98

Please sign in to comment.