-
Notifications
You must be signed in to change notification settings - Fork 804
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] Add support for instantiating uniquified ipgen IPs #25966
Conversation
Signed-off-by: Robert Schilling <[email protected]>
a265065
to
f051d9e
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
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
CHANGE AUTHORIZED: hw/top_earlgrey/data/top_earlgrey.hjson This PR adds some now keys to the Earlgrey hjson but there is no RTL or functional impact of this. This is fine. |
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.
A couple of notes about improvements that are probably worth doing, but they can be in a follow-up so shouldn't block this PR.
CHANGE AUTHORIZED: hw/top_earlgrey/data/top_earlgrey.hjson We gain some new keys in the hjson file, but these won't have any effect on the Earlgrey configuration. |
Thanks for your reviews, I am merging this to unblock follow-up work but it would still be good if @Razer6 could address the points you've raised. |
This PR adds basic support to render and instantiate uniquified IPs from ipgen. The change is done in the following way:
module_instance_name
parameter. This is not true for all IPs there. Though this parameter was added to all*.tpldesc
files, even it is not used.attr: "ipen"
), you specify three different fields:template_type
: This is the basic template type that is used to render the IP from.type
: This is the uniquified type.name
: This is the actual instance name used in the top-level SystemVerilog file.Let's make an example: To render a uniquified
rv_plic
you would set the following parameters in the HJSON:This would render and create new module
my_fancy_plic
and the instantiation would look like:Note, currently, only the AC ranges, RACL Ctrl, and the PLIC support this kind of uniquification. The alert handler would support it in theory. However, here, the template needs a few modifications as the uniquication there does create wrong file names.