From 0b9e73a9f066959ce9f6592e3ff6482d35eb9a0c Mon Sep 17 00:00:00 2001 From: Hakim Filali Date: Mon, 5 Feb 2024 10:37:07 +0000 Subject: [PATCH] [edn/rtl] Signal all recoverable alerts Not all recoverable alerts are currently sent to the alert handler. This commit changes this. Now the alert handler is notified for all the recoverable alerts. Signed-off-by: Hakim Filali --- hw/ip/edn/rtl/edn_core.sv | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/hw/ip/edn/rtl/edn_core.sv b/hw/ip/edn/rtl/edn_core.sv index 3efd91a824243..05a86990aaa4a 100644 --- a/hw/ip/edn/rtl/edn_core.sv +++ b/hw/ip/edn/rtl/edn_core.sv @@ -76,6 +76,7 @@ module edn_core import edn_pkg::*; // signals logic event_edn_cmd_req_done; logic event_edn_fatal_err; + logic event_edn_recov_err; logic [EdnEnableCopies-1:FatalErr] edn_enable_fo; logic [FifoRstCopies-1:1] cmd_fifo_rst_fo; logic [BootReqCopies-1:1] boot_req_mode_fo; @@ -344,6 +345,25 @@ module edn_core import edn_pkg::*; end : gen_err_code_test_bit + // Combine all recoverable alert signals into one singular signal. + assign event_edn_recov_err = edn_bus_cmp_alert || cmd_fifo_rst_pfa || auto_req_mode_pfa || + boot_req_mode_pfa || edn_enable_pfa; + + // Turn event_edn_recov_err into a pulse for the case when + // the signals are high for more then one cycle. + prim_edge_detector #( + .Width(1), + .ResetValue(0), + .EnSync(0) + ) u_prim_edge_detector_recov_alert ( + .clk_i, + .rst_ni, + .d_i(event_edn_recov_err), + .q_sync_o(), + .q_posedge_pulse_o(recov_alert_o), + .q_negedge_pulse_o() + ); + // alert - send all interrupt sources to the alert for the fatal case assign fatal_alert_o = event_edn_fatal_err; @@ -791,21 +811,6 @@ module edn_core import edn_pkg::*; assign edn_bus_cmp_alert = cs_rdata_capt_vld && cs_rdata_capt_vld_q && (cs_rdata_capt_q == packer_cs_rdata[63:0]); - - - prim_edge_detector #( - .Width(1), - .ResetValue(0), - .EnSync(0) - ) u_prim_edge_detector_recov_alert ( - .clk_i, - .rst_ni, - .d_i(edn_bus_cmp_alert), - .q_sync_o(), - .q_posedge_pulse_o(recov_alert_o), - .q_negedge_pulse_o() - ); - assign hw2reg.recov_alert_sts.edn_bus_cmp_alert.de = edn_bus_cmp_alert; assign hw2reg.recov_alert_sts.edn_bus_cmp_alert.d = edn_bus_cmp_alert;