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 ago --- Quote Start --- In the first case, you're comparing a std_logic_vector to an array of std_logic_vector. Doesn't work. In the 2nd case, you're comparing a std_logic to a std_logic_vector. Doesn't work either. I assume the problem is that the type of com_str is wrong. I guess it should really be this:
signal command: std_logic_vector(7 downto 0); That would, from the context, make more sense to me. --- Quote End --- 'command' is not a char - it's array of chars. this way - command: std_logic_vector(7 downto 0); - it holds only one char, and I need to get array of chars from terminal.