D
daniele
Guest
hello everybody, i have the necessity to use an array of
std_logic_vector's, and i would like to do it in such a way that both
the size of the array and the size of the std_logic_vector be defined
by generic parameters.
i tried the following code, inside an architecture:
signal wires : array (0 to num) of std_logic_vector(width downto 0);
but it seems not to work.
a way to "almost" solve the problem would be to define, in a package, a
type in this way:
type wires is array (natural range <> of std_logic_vector (width
downto 0);
but the problem is that, being the definition inside a package, i
cannot define "width" as a generic...
does anybody know whether there's a way to do it?
thanx in advance,
daniele
std_logic_vector's, and i would like to do it in such a way that both
the size of the array and the size of the std_logic_vector be defined
by generic parameters.
i tried the following code, inside an architecture:
signal wires : array (0 to num) of std_logic_vector(width downto 0);
but it seems not to work.
a way to "almost" solve the problem would be to define, in a package, a
type in this way:
type wires is array (natural range <> of std_logic_vector (width
downto 0);
but the problem is that, being the definition inside a package, i
cannot define "width" as a generic...
does anybody know whether there's a way to do it?
thanx in advance,
daniele