-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[topgen] Only create pwrmgr/pinmux/alert_handler if there is an instance #25432
Conversation
4c6fde5
to
e7b74af
Compare
89acca7
to
bb8af72
Compare
bb8af72
to
269751c
Compare
d3abbca
to
ed6899b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in the sense that it doesn't negatively impact currently generated tops. Whether the result is correct for tops that make use of the added functionality I cannot say, though
clkmgrs = [m for m in top['module'] if m['type'] == 'clkmgr'] | ||
rstmgrs = [m for m in top['module'] if m['type'] == 'rstmgr'] | ||
|
||
if len(pwrmgrs) == 1 * len(clkmgrs) == 1 * len(rstmgrs) != 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check was broken as it only checked the rstmgr
but not the others due to operator precedence.
cdb05f4
to
7613b07
Compare
7613b07
to
8b90b79
Compare
I used it downstream, and it works. The used top-level template though needs some tweaks, but I leave that as a downstream issue. One thing I needed to change was the order of the alert and plic mappings in I had to add a special case for Englishbreakfast. Although this top does not have an alert handler in the design it uses SW from it. It copies its own alert handler config over to Earlgrey and then build SW from that. Here, In this PR we ensure that the alert handler is generated for Englishbreakfast even though the design does not have an actual alert handler. |
a980cff
to
bbffa89
Compare
Signed-off-by: Robert Schilling <[email protected]>
Signed-off-by: Robert Schilling <[email protected]>
Signed-off-by: Robert Schilling <[email protected]>
Signed-off-by: Robert Schilling <[email protected]>
Signed-off-by: Robert Schilling <[email protected]>
Signed-off-by: Robert Schilling <[email protected]>
Signed-off-by: Robert Schilling <[email protected]>
bbffa89
to
4f23cee
Compare
Not all tops may have a pwrmgr, pinmux, alert_handler or clkmgr. Only create those IPs and the related connections if the top really specifies those IPs.