[alert_handler] Fix reset value issue in ping timer Due to a recent change in prim_count, the reset value of the counter is not zero anymore in cross-count mode. Since the FSM in the alert_handler_ping_timer expects this, the prim_count mode is changed back to DupCnt in order to fix this. Signed-off-by: Michael Schaffner <msf@opentitan.org>
diff --git a/hw/ip_templates/alert_handler/data/alert_handler.hjson.tpl b/hw/ip_templates/alert_handler/data/alert_handler.hjson.tpl index b910ffa..a342109 100644 --- a/hw/ip_templates/alert_handler/data/alert_handler.hjson.tpl +++ b/hw/ip_templates/alert_handler/data/alert_handler.hjson.tpl
@@ -281,13 +281,13 @@ ''' } { name: "ACCU.CTR.REDUN", - desc: "Accumulator counters are redundant." + desc: "Accumulator counters employ a cross-counter implementation." } { name: "ESC_TIMER.CTR.REDUN", - desc: "Escalation timer counters are redundant." + desc: "Escalation timer counters employ a duplicated counter implementation." } { name: "PING_TIMER.CTR.REDUN", - desc: "Ping timer counters are redundant." + desc: "Ping timer counters employ a duplicated counter implementation." } { name: "PING_TIMER.LFSR.REDUN", desc: "Ping timer LFSR is redundant."
diff --git a/hw/ip_templates/alert_handler/rtl/alert_handler_ping_timer.sv b/hw/ip_templates/alert_handler/rtl/alert_handler_ping_timer.sv index 3734413..bdba09d 100644 --- a/hw/ip_templates/alert_handler/rtl/alert_handler_ping_timer.sv +++ b/hw/ip_templates/alert_handler/rtl/alert_handler_ping_timer.sv
@@ -201,8 +201,8 @@ // SEC_CM: PING_TIMER.CTR.REDUN prim_count #( .Width(PING_CNT_DW), - .OutSelDnCnt(1), // count down - .CntStyle(prim_count_pkg::CrossCnt), + .OutSelDnCnt(0), + .CntStyle(prim_count_pkg::DupCnt), // The alert handler behaves differently than other comportable IP. I.e., instead of sending out // an alert signal, this condition is handled internally in the alert handler. .EnableAlertTriggerSVA(0) @@ -213,7 +213,7 @@ .set_i(cnt_set), .set_cnt_i(cnt_setval), .en_i(!timer_expired), - .step_i(PING_CNT_DW'(1)), + .step_i({PING_CNT_DW{1'b1}}), // 2's complement for -1, since we count down .cnt_o(cnt), .err_o(cnt_error) );
diff --git a/hw/top_earlgrey/ip_autogen/alert_handler/data/alert_handler.hjson b/hw/top_earlgrey/ip_autogen/alert_handler/data/alert_handler.hjson index a1a5d68..a69345b 100644 --- a/hw/top_earlgrey/ip_autogen/alert_handler/data/alert_handler.hjson +++ b/hw/top_earlgrey/ip_autogen/alert_handler/data/alert_handler.hjson
@@ -381,13 +381,13 @@ ''' } { name: "ACCU.CTR.REDUN", - desc: "Accumulator counters are redundant." + desc: "Accumulator counters employ a cross-counter implementation." } { name: "ESC_TIMER.CTR.REDUN", - desc: "Escalation timer counters are redundant." + desc: "Escalation timer counters employ a duplicated counter implementation." } { name: "PING_TIMER.CTR.REDUN", - desc: "Ping timer counters are redundant." + desc: "Ping timer counters employ a duplicated counter implementation." } { name: "PING_TIMER.LFSR.REDUN", desc: "Ping timer LFSR is redundant."
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 3734413..bdba09d 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
@@ -201,8 +201,8 @@ // SEC_CM: PING_TIMER.CTR.REDUN prim_count #( .Width(PING_CNT_DW), - .OutSelDnCnt(1), // count down - .CntStyle(prim_count_pkg::CrossCnt), + .OutSelDnCnt(0), + .CntStyle(prim_count_pkg::DupCnt), // The alert handler behaves differently than other comportable IP. I.e., instead of sending out // an alert signal, this condition is handled internally in the alert handler. .EnableAlertTriggerSVA(0) @@ -213,7 +213,7 @@ .set_i(cnt_set), .set_cnt_i(cnt_setval), .en_i(!timer_expired), - .step_i(PING_CNT_DW'(1)), + .step_i({PING_CNT_DW{1'b1}}), // 2's complement for -1, since we count down .cnt_o(cnt), .err_o(cnt_error) );