Hi,
I will simplify my question: say I want to store an array of n*m numbers. Then I want to be able to compute the product of two such values, many products at the same time. I think I can't use a memory as only one value will be readable at each clock cycle and I need to read any value immediatly at any time.
How should I implement it in VHDL language?
Implement the numbers as a two dimensional matrix of numbers. Something like this...
type t_MATRIX_O_NUMBERS is array(1 to n, 1 to m) of unsigned(...); -- If you want to use unsigned numbers
type t_MATRIX_O_NUMBERS is array(1 to n, 1 to m) of ufixed(...); -- If you want to use fixed point unsigned numbers
type t_MATRIX_O_NUMBERS is array(1 to n, 1 to m) of sfixed(...); -- If you want to use fixed point signed numbers
type t_MATRIX_O_NUMBERS is array(1 to n, 1 to m) of integer range ...; -- If you want to use integer numbers
Then you declare a signal as...
signal My_Matrix: t_MATRIX_O_NUMBERS;
** In each of the above, the '...' needs to be replaced by something that defines how many bits of precision you want for these n*m numbers.
** It's also likely that it would be better to define the range of the array as '0 to (n-1), 0 to (m-1)' rather than '1 to n, 1 to m'. That's up to you to decide.
Kevin Jennings