Forum Discussion
Altera_Forum
Honored Contributor
9 years agoCompare two byte arrays
I have a list of commands and a command received from UART.
type commands is array(0 to COM_SIZE) of std_logic_vector(7 downto 0);
signal commands_list : commands(0 to COM_COUNT) :=
(
x"73...
Altera_Forum
Honored Contributor
9 years agoAh, now I understand. So, a "char" in your case is supposed to be a std_logic_vector with 8 bits, right?
But then, "commands" should be an array of array of std_logic_vector(7 downto 0). You're missing one level of arrays. You try to initialize a std_logic_vector(7 downto 0) with "x"73746F700000", where "73746F700000" is 48 bits. I wonder why the compiler doesn't complain, but you have to fix that first.