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 agoI agree that your approach looks correct now.
However, without seeing the complete code, I cannot tell what's wrong. I have no clue what line 71 is, and I have no clue how the signals and types that are references in that line are declared. Keep that in mind before posting anything else. Anyway, here's some code that passes synthesis, and should give you the right pointers:type command_type is array(0 to 5) of std_logic_vector(7 downto 0);
type commands_type is array(0 to 2) of command_type;
signal commands: commands_type := (
0 => (0 => x"00", 1 => x"01", 2 => x"10", 3 => x"11", 4 => x"20", 5 => x"21"), --stop
1 => (0 => x"00", 1 => x"01", 2 => x"10", 3 => x"11", 4 => x"20", 5 => x"21"), --fwd
2 => (0 => x"00", 1 => x"01", 2 => x"10", 3 => x"11", 4 => x"20", 5 => x"21") --rev
);