Reputation: 335
I want to make one array out of two.
TYPE character_string IS array (0 TO 15) of unsigned (7 DOWNTO 0);
TYPE full_string IS array (0 TO 31) of unsigned (7 DOWNTO 0);
SIGNAL lcd_oben, lcd_unten : character_string;
SIGNAL lcd_data : full_string;
And i want to take the two smaller arrays and put them togehter in the big one. Something like this:
lcd_data <= lcd_oben & lcd_unten;
But that gives the error:
Error (10327): VHDL error at seqdec.vhd(55): can't determine definition of operator ""&"" -- found 0 possible definitions
Can anybody help?
Best regards Adrian
Upvotes: 3
Views: 91
Reputation:
You have declared these as wholly unrelated array types, so you have told the compiler not to mix them together without type conversions.
I don't think that's really what you wanted to do.
Make both array types, subtypes of an unconstrained array, like array(<>) of unsigned(7 downto 0)
. Then they are not completely separate types and there should be a predefined &
operator for them.
TYPE LCD_string IS array (natural range <>) of unsigned (7 DOWNTO 0);
SUBTYPE character_string IS LCD_String (0 TO 15);
SUBTYPE full_string IS LCD_String (0 TO 31);
(Alternatively you can write your own &
function which performs the necessary conversions; IMO this would be poor design).
Upvotes: 3