diff --git a/hdl/combpm_protocol_electron.vhd b/hdl/combpm_protocol_electron.vhd index 499d56286c9b3434f16e0abbe7cdd0b433a91334..636a385178215107cb4e767ed46b41eae5eb476c 100644 --- a/hdl/combpm_protocol_electron.vhd +++ b/hdl/combpm_protocol_electron.vhd @@ -62,7 +62,7 @@ architecture rtl of combpm_protocol_electron is signal flag_rsvd : std_logic; signal flag_crc : std_logic; signal flag_all : std_logic; - signal flag_any : std_logic; + signal flag_frame : std_logic; signal packet_bpmid : std_logic_vector(9 downto 0); signal packet_startframe : std_logic; @@ -132,7 +132,7 @@ begin -- Any and all flag flag_all <= flag_sop and flag_eop and flag_dummy and flag_rsvd and flag_crc and gt_interfaceready; - flag_any <= (flag_sop or flag_eop or flag_crc) and gt_interfaceready; + flag_frame <= flag_sop and flag_eop and gt_interfaceready; ---------------------------- -- FRAME FIELD EXTRACTION -- @@ -280,7 +280,7 @@ begin ------------------------ -- CONTROL AND STATUS -- ------------------------ - frame_error <= flag_all xor flag_any; + frame_error <= flag_frame and not flag_all; frame_valid_cnt <= std_logic_vector(cnt_valid_r); frame_invalid_cnt <= std_logic_vector(cnt_invalid_r); frame_seq_cnt <= std_logic_vector(last_cnt_seq_r); @@ -321,7 +321,7 @@ begin end if; -- Invalid frame counter - if (flag_all xor flag_any) = '1' then + if (flag_frame and not flag_all) = '1' then cnt_invalid_r <= cnt_invalid_r+1; end if; @@ -338,7 +338,7 @@ begin end if; -- Invalid frame rate counter - if (flag_all xor flag_any) = '1' then + if (flag_frame and not flag_all) = '1' then rate_invalid_r <= rate_invalid_r+1; end if; end if;