--- Quote Start ---
Hello everyone
I have a question about the following piece of code
IEEE.STD_LOGIC_UNSIGNED.ALL
|
|
|
ARCHITECTURE FSMD OF lcd_driver IS
SUBTYPE ascii IS STD_LOGIC_VECTOR(7 DOWNTO 0);
TYPE charArray IS array(1 to 6) OF ascii;
SHARED VARIABLE line1: charArray := (x"31",x"32",x"33",x"34",x"35",x"36");
|
|
|
BEGIN
When i try to change on of the values in line1 array by using:
line1(1) := x"20"; i get an error
Enybody know what i did wrong ?
Thanks in advance
--- Quote End ---
Line1 is defied to be an array (1 to 6), but what you posted only initialized line1(1) in the declaration. When you define an initial value for an array, you have to define all of the elements. Later on, (i.e. not where the variable is declared), you can set one element.
Kevin Jennings