From 03860b7d876b749a737581697c6aecdddfdb012a Mon Sep 17 00:00:00 2001 From: Salvatore Di Girolamo Date: Wed, 23 Nov 2022 08:17:28 +0100 Subject: [PATCH] Clearing eom_seen when freeing up the FMQ --- hw/src/pkt_scheduler/mpq_engine.sv | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/hw/src/pkt_scheduler/mpq_engine.sv b/hw/src/pkt_scheduler/mpq_engine.sv index 95c7af7..fd4551a 100644 --- a/hw/src/pkt_scheduler/mpq_engine.sv +++ b/hw/src/pkt_scheduler/mpq_engine.sv @@ -482,7 +482,19 @@ module mpq_fsm #( endcase end - assign mpq_o.eom_seen = mpq_q.eom_seen || (her_new_i && her_new_is_eom_i); + always_comb begin + mpq_o.eom_seen = mpq_q.eom_seen; + + // set it if we see the EOM + if (her_new_i && her_new_is_eom_i) begin + mpq_o.eom_seen = 1; + end + + // clear it if we are transitioning to Free state + if (mpq_o.state == Free) begin + mpq_o.eom_seen = 0; + end + end //update state always_comb begin //H-P-C case