Commit 11666a38 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

wr_endpoint: ep_rx_status_reg_insert: drop instead of error if packet has been filtered out

parent f0bcc815
......@@ -35,7 +35,6 @@ architecture rtl of ep_rx_status_reg_insert is
type t_state is (WAIT_FRAME, GEN_STATUS);
signal dreq_mask : std_logic;
signal force_error : std_logic;
signal embed_status : std_logic;
signal sreg : t_wrf_status_reg;
signal state : t_state;
......@@ -63,6 +62,8 @@ architecture rtl of ep_rx_status_reg_insert is
signal TRIG1 : std_logic_vector(31 downto 0);
signal TRIG2 : std_logic_vector(31 downto 0);
signal TRIG3 : std_logic_vector(31 downto 0);
signal sof_mask : std_logic;
begin -- rtl
......@@ -98,30 +99,29 @@ begin -- rtl
src_fab_out.data <= f_marshall_wrf_status(sreg) when (embed_status = '1') else snk_fab_i.data;
src_fab_out.addr <= c_WRF_STATUS when (embed_status = '1') else snk_fab_i.addr;
src_fab_out.sof <= snk_fab_i.sof;
src_fab_out.sof <= snk_fab_i.sof and sof_mask;
src_fab_out.eof <= snk_fab_i.eof;
src_fab_out.error <= snk_fab_i.error or force_error;
src_fab_out.error <= snk_fab_i.error;
src_fab_out.bytesel <= snk_fab_i.bytesel;
src_fab_out.dvalid <= snk_fab_i.dvalid or (embed_status and src_dreq_i);
src_fab_o <=src_fab_out;
src_fab_o <= src_fab_out;
sof_mask <= (pfilter_done_i and ematch_done_i and not (pfilter_drop_i or ematch_is_pause_i));
p_gen_status : process(clk_sys_i)
begin
if rising_edge(clk_sys_i) then
if rst_n_i = '0' then
state <= WAIT_FRAME;
force_error <= '0';
dreq_mask <= '1';
else
case state is
when WAIT_FRAME =>
if(snk_fab_i.sof = '1') then
if(pfilter_done_i = '0' or ematch_done_i = '0') then
force_error <= '1';
rmon_o.rx_path_timing_failure <= '1';
else
force_error <= pfilter_drop_i or ematch_is_pause_i;
rmon_o.rx_pause <= ematch_is_pause_i;
rmon_o.rx_pfilter_drop <= pfilter_drop_i;
......@@ -130,7 +130,6 @@ begin -- rtl
dreq_mask <= '0';
end if;
sreg.match_class <= pfilter_pclass_i;
sreg.is_hp <= ematch_is_hp_i;
sreg.has_crc <= '1';
......@@ -141,7 +140,6 @@ begin -- rtl
rmon_o.rx_pfilter_drop <= '0';
rmon_o.rx_pause <= '0';
rmon_o.rx_path_timing_failure <= '0';
force_error <= '0';
dreq_mask <= '1';
end if;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment