From 953d1c8e8409c988beb4f4aa583c0acc6500f1c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Romain=20Bron=C3=A8s?=
 <romain.broucquart@synchrotron-soleil.fr>
Date: Thu, 4 Jan 2024 14:44:22 +0100
Subject: [PATCH] fix: Stop frame when soft reset, fix OK flag

* Remove check on dummy and reserved field on the frame. Frame is OK
  only of SOP EOP and CRC OK
* When soft reset is set, TVALID stays at zero. Not more packet output
  on AXIS
---
 hdl/combpm_protocol_electron.vhd | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hdl/combpm_protocol_electron.vhd b/hdl/combpm_protocol_electron.vhd
index 16c3b95..4ac9319 100644
--- a/hdl/combpm_protocol_electron.vhd
+++ b/hdl/combpm_protocol_electron.vhd
@@ -163,7 +163,7 @@ begin
                            '0';
 
     -- Any and all flag
-    flag_all            <= flag_sop and flag_eop and flag_dummy and flag_rsvd and flag_crc;
+    flag_all            <= flag_sop and flag_eop and flag_crc;
     flag_frame          <= flag_sop and flag_eop;
 
     ----------------------------
@@ -293,7 +293,7 @@ begin
                 packet.fa_seq       <= packet_timestamp(7 downto 0);
 
                 -- AXIS TVALID
-                m_axi_tvalid                <= '1';
+                m_axi_tvalid            <= not soft_reset;
             else
                 m_axi_tvalid            <= '0';
             end if;
-- 
GitLab