vhdl: implement bounds checking for strand number
This commit is contained in:
parent
fcfa9eb7d0
commit
0f497e76e8
1 changed files with 6 additions and 4 deletions
|
@ -146,10 +146,12 @@ begin
|
|||
-- TODO udp_length, range check with MAX_STRAND_LEN
|
||||
num_pixels <= MAX_STRAND_LEN;
|
||||
|
||||
-- FIXME bounds check
|
||||
if unsigned(udp_data) >= NUM_STRANDS then
|
||||
receive_state <= DROP;
|
||||
else
|
||||
active_strand <= to_integer(unsigned(udp_data));
|
||||
|
||||
receive_state <= FRAME_NUM;
|
||||
end if;
|
||||
|
||||
when FRAME_NUM =>
|
||||
if not some_strands_written then
|
||||
|
|
Loading…
Reference in a new issue