Skip to content

Commit

Permalink
[topgen] Use the number of alerts and not alert modules
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Razer6 authored and andreaskurth committed Dec 2, 2024
1 parent 1a85154 commit 54332ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/topgen/templates/toplevel_pkg.sv.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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])};
Expand Down

0 comments on commit 54332ee

Please sign in to comment.