From 54332ee2ec7dda0001833dfc915100ccd9dfaabf Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Mon, 2 Dec 2024 10:13:09 -0800 Subject: [PATCH] [topgen] Use the number of alerts and not alert modules Previously, the numner of alert modules was used to determine the number of outoging alerts. That's wrong. If a device has more than one alert, the number of alert modules and the actual number alerts diverges. This PR fixes that. Signed-off-by: Robert Schilling --- util/topgen/templates/toplevel_pkg.sv.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/topgen/templates/toplevel_pkg.sv.tpl b/util/topgen/templates/toplevel_pkg.sv.tpl index a9b1bac6233e4..ac707c13f4021 100644 --- a/util/topgen/templates/toplevel_pkg.sv.tpl +++ b/util/topgen/templates/toplevel_pkg.sv.tpl @@ -65,7 +65,7 @@ package top_${top["name"]}_pkg; % for alert_group, alert_modules in top["outgoing_alert_module"].items(): // Number of ${alert_group} outgoing alerts - parameter int unsigned NOutgoingAlerts${alert_group.capitalize()} = ${len(alert_modules)}; + parameter int unsigned NOutgoingAlerts${alert_group.capitalize()} = ${len(top['outgoing_alert'][alert_group])}; // Number of LPGs for outgoing alert group ${alert_group} parameter int unsigned NOutgoingLpgs${alert_group.capitalize()} = ${len(top["outgoing_alert_lpgs"][alert_group])};