ELGIP-129 Adding configuration to tests to filter on destination IP addr, protocol ID and TCP port. Found and fixed various bugs in the RX packet split block.
This commit is contained in:
parent
e50bd1ba65
commit
077cf5cbfa
1 changed files with 13 additions and 7 deletions
|
|
@ -51,8 +51,10 @@ architecture rtl of rx_packet_filter_0 is
|
|||
-----------------------------------------------------------------------------
|
||||
|
||||
signal cfg_filt_wr, cfg_mask_wr : std_logic;
|
||||
signal check_completed, last_address : std_logic;
|
||||
signal checksum_ok, completed_flag : std_logic;
|
||||
signal last_address : std_logic;
|
||||
signal check_completed : std_logic;
|
||||
signal checksum_ok : std_logic;
|
||||
signal completed_flag : std_logic;
|
||||
signal rx_data_valid_d : std_logic;
|
||||
signal filt_addr : std_logic_vector( 3 downto 0);
|
||||
signal rx_data_i, rx_data_masked : std_logic_vector(63 downto 0);
|
||||
|
|
@ -95,7 +97,7 @@ begin
|
|||
begin
|
||||
if(clk = '1' and clk'event) then
|
||||
rx_data_valid_d <= rx_data_valid;
|
||||
check_completed <= (end_of_packet or last_address) and not completed_flag;
|
||||
check_completed <= last_address and not completed_flag and not end_of_packet;
|
||||
if(init = '1' or end_of_packet = '1') then
|
||||
filt_addr <= (others => '0');
|
||||
elsif(rx_data_valid = '1' and (completed_flag = '0')) then
|
||||
|
|
@ -106,14 +108,18 @@ begin
|
|||
elsif(check_completed = '1') then
|
||||
completed_flag <= '1';
|
||||
end if;
|
||||
if(check_completed = '1') then
|
||||
|
||||
if(check_completed = '1' or (end_of_packet = '1' and completed_flag = '0')) then
|
||||
completed <= '1';
|
||||
else
|
||||
completed <= '0';
|
||||
end if;
|
||||
if(init = '1' or start_of_packet = '1') then
|
||||
|
||||
if unsigned(filt_len) = 0 then
|
||||
filter_match <= '1';
|
||||
elsif(init = '1' or start_of_packet = '1') then
|
||||
filter_match <= '0';
|
||||
elsif(check_completed = '1') then
|
||||
elsif(check_completed = '1' or end_of_packet = '1') then
|
||||
filter_match <= checksum_ok;
|
||||
end if;
|
||||
if(init = '1' or start_of_packet = '1') then
|
||||
|
|
@ -129,6 +135,6 @@ begin
|
|||
|
||||
rx_data_masked <= rx_data_i and mask_out;
|
||||
|
||||
last_address <= '1' when unsigned(filt_addr) = unsigned(filt_len) or unsigned(filt_addr) = 31 else '0';
|
||||
last_address <= '1' when (unsigned(filt_addr) = unsigned(filt_len) and unsigned(filt_len) /= 0) or unsigned(filt_addr) = 31 else '0';
|
||||
|
||||
end architecture rtl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue