Feb 11, 2003 #1 tapa Super Member Joined Feb 17, 2002 Messages 133 Helped 8 Reputation 16 Reaction score 5 Trophy points 1,298 Location spain Activity points 1,096 simple VHDL question Hello, I am new on vhdl, and I have a simple question how to initialize a n dimension array, for example: type matriz is array (1 to 4, 1 to 2) of integer; signal una: matriz := (1,2,3,4;2,3,5,6); -- This is wrong, but how must be done? Thank you for all Tapa
simple VHDL question Hello, I am new on vhdl, and I have a simple question how to initialize a n dimension array, for example: type matriz is array (1 to 4, 1 to 2) of integer; signal una: matriz := (1,2,3,4;2,3,5,6); -- This is wrong, but how must be done? Thank you for all Tapa
Feb 11, 2003 #2 R rol73 Junior Member level 3 Joined Jan 15, 2003 Messages 28 Helped 1 Reputation 2 Reaction score 1 Trophy points 1,283 Activity points 260 How to initialize a n-dimensional array You should treat your n-dimensional array as though it were an array of arrays, writing un array aggregate for each of leftmost index values first. Example: ( 1 2 ) ( 3 4 ) ( 5 6 ) ( 7 8 ) Code: type matriz is array (1 to 4, 1 to 2) of integer; signal una: matriz := ( (1,2), (3,4), (5,6), (7,8) );
How to initialize a n-dimensional array You should treat your n-dimensional array as though it were an array of arrays, writing un array aggregate for each of leftmost index values first. Example: ( 1 2 ) ( 3 4 ) ( 5 6 ) ( 7 8 ) Code: type matriz is array (1 to 4, 1 to 2) of integer; signal una: matriz := ( (1,2), (3,4), (5,6), (7,8) );
Feb 11, 2003 #3 tapa Super Member Joined Feb 17, 2002 Messages 133 Helped 8 Reputation 16 Reaction score 5 Trophy points 1,298 Location spain Activity points 1,096 Thak you very much!!! More easy I think. Tapa