Hi,
I was wondering if anyone could help as i'm new to VHDL.
I would like to create an array of size (256 * 24)
That is 256 row elements, with each element 24 bits wide.
0. [<-24 bits ->]
1. [<-24 bits ->]
.....
255. [<-24 bits ->]
Is an array of this size possible?
I'm assuming this syntax would create the array called 'x'???:
TYPE array1 IS ARRAY (0 TO 255) OF STD_LOGIC_VECTOR (23 DOWNTO 0);
SIGNAL x: array1;
Now how would I go about assigning 24 bit values to individual elements?
Is there a function I could use? Or would I have to declare each elements' value explicitly - like x(0) = "111111111111111111111111" ?
Also, how could I assign a 24 bit element of the array to a vector?
Would this do it?:
signal y: std_logic_vector (23 DOWNTO 0);
y <= x(0);
Regards,
AM
I was wondering if anyone could help as i'm new to VHDL.
I would like to create an array of size (256 * 24)
That is 256 row elements, with each element 24 bits wide.
0. [<-24 bits ->]
1. [<-24 bits ->]
.....
255. [<-24 bits ->]
Is an array of this size possible?
I'm assuming this syntax would create the array called 'x'???:
TYPE array1 IS ARRAY (0 TO 255) OF STD_LOGIC_VECTOR (23 DOWNTO 0);
SIGNAL x: array1;
Now how would I go about assigning 24 bit values to individual elements?
Is there a function I could use? Or would I have to declare each elements' value explicitly - like x(0) = "111111111111111111111111" ?
Also, how could I assign a 24 bit element of the array to a vector?
Would this do it?:
signal y: std_logic_vector (23 DOWNTO 0);
y <= x(0);
Regards,
AM