vhdl - Unite two arrays -
i want make 1 array out of two.
type character_string array (0 15) of unsigned (7 downto 0); type full_string array (0 31) of unsigned (7 downto 0); signal lcd_oben, lcd_unten : character_string; signal lcd_data : full_string;
and want take 2 smaller arrays , put them togehter in big one. this:
lcd_data <= lcd_oben & lcd_unten;
but gives error:
error (10327): vhdl error @ seqdec.vhd(55): can't determine definition of operator ""&"" -- found 0 possible definitions
can help?
best regards adrian
you have declared these wholly unrelated array types, have told compiler not mix them without type conversions.
i don't think that's wanted do.
make both array types, subtypes of unconstrained array, array(<>) of unsigned(7 downto 0)
. not separate types , there should predefined &
operator them.
type lcd_string array (natural range <>) of unsigned (7 downto 0); subtype character_string lcd_string (0 15); subtype full_string lcd_string (0 31);
(alternatively can write own &
function performs necessary conversions; imo poor design).
Comments
Post a Comment