From fbb4ab7a41aff3f41a08f13bb011a2cef67b2318 Mon Sep 17 00:00:00 2001 From: Quan Nguyen Date: Thu, 20 Feb 2025 15:42:36 +0000 Subject: [PATCH 1/2] [alert_handler,rtl] Fix esc_ping_en widening cast esc_ping_en is a N_ESC_SEV-wide one-hot signal that is shifted by esc_cnt, which can go up to 3. As a-will observes in https://github.com/lowRISC/opentitan/pull/22568#discussion_r1962486432, the too-narrow cast didn't cause a problem because the LHS causes us to widen again to N_ESC_SEV anyway. Signed-off-by: Quan Nguyen --- .../alert_handler/rtl/alert_handler_ping_timer.sv.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ip_templates/alert_handler/rtl/alert_handler_ping_timer.sv.tpl b/hw/ip_templates/alert_handler/rtl/alert_handler_ping_timer.sv.tpl index eabf0db31f7d3..8fafe35560ba3 100644 --- a/hw/ip_templates/alert_handler/rtl/alert_handler_ping_timer.sv.tpl +++ b/hw/ip_templates/alert_handler/rtl/alert_handler_ping_timer.sv.tpl @@ -276,7 +276,7 @@ module ${module_instance_name}_ping_timer import ${module_instance_name}_pkg::*; // generate ping enable vector assign alert_ping_req_o = NAlerts'(alert_ping_en) << id_to_ping_q; - assign esc_ping_req_o = EscSenderIdxWidth'(esc_ping_en) << esc_cnt; + assign esc_ping_req_o = N_ESC_SEV'(esc_ping_en) << esc_cnt; // under normal operation, these signals should never be asserted. // we place hand instantiated buffers here such that these signals are not From 9cfd4021abd8f1fe3ca53db89ee236eac955db12 Mon Sep 17 00:00:00 2001 From: Quan Nguyen Date: Thu, 20 Feb 2025 17:46:03 +0000 Subject: [PATCH 2/2] [alert_handler,rtl] Regenerate alert_handler_ping_timer Signed-off-by: Quan Nguyen --- .../ip_autogen/alert_handler/rtl/alert_handler_ping_timer.sv | 2 +- .../ip_autogen/alert_handler/rtl/alert_handler_ping_timer.sv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/top_darjeeling/ip_autogen/alert_handler/rtl/alert_handler_ping_timer.sv b/hw/top_darjeeling/ip_autogen/alert_handler/rtl/alert_handler_ping_timer.sv index 6523fc7394fa5..edae445f52ac5 100644 --- a/hw/top_darjeeling/ip_autogen/alert_handler/rtl/alert_handler_ping_timer.sv +++ b/hw/top_darjeeling/ip_autogen/alert_handler/rtl/alert_handler_ping_timer.sv @@ -276,7 +276,7 @@ module alert_handler_ping_timer import alert_handler_pkg::*; #( // generate ping enable vector assign alert_ping_req_o = NAlerts'(alert_ping_en) << id_to_ping_q; - assign esc_ping_req_o = EscSenderIdxWidth'(esc_ping_en) << esc_cnt; + assign esc_ping_req_o = N_ESC_SEV'(esc_ping_en) << esc_cnt; // under normal operation, these signals should never be asserted. // we place hand instantiated buffers here such that these signals are not diff --git a/hw/top_earlgrey/ip_autogen/alert_handler/rtl/alert_handler_ping_timer.sv b/hw/top_earlgrey/ip_autogen/alert_handler/rtl/alert_handler_ping_timer.sv index 6523fc7394fa5..edae445f52ac5 100644 --- a/hw/top_earlgrey/ip_autogen/alert_handler/rtl/alert_handler_ping_timer.sv +++ b/hw/top_earlgrey/ip_autogen/alert_handler/rtl/alert_handler_ping_timer.sv @@ -276,7 +276,7 @@ module alert_handler_ping_timer import alert_handler_pkg::*; #( // generate ping enable vector assign alert_ping_req_o = NAlerts'(alert_ping_en) << id_to_ping_q; - assign esc_ping_req_o = EscSenderIdxWidth'(esc_ping_en) << esc_cnt; + assign esc_ping_req_o = N_ESC_SEV'(esc_ping_en) << esc_cnt; // under normal operation, these signals should never be asserted. // we place hand instantiated buffers here such that these signals are not