Skip to content
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] Remove duplicated license headers from autogen files #2929

Open
vogelpi opened this issue Jul 22, 2020 · 5 comments
Open

[topgen] Remove duplicated license headers from autogen files #2929

vogelpi opened this issue Jul 22, 2020 · 5 comments
Labels
Component:Tooling Issues related to tooling, e.g. tools/scripts for doc, code generation (docgen, reggen), CSR Earlgrey-PROD Triaged Temporary label to triage issues into Earlgrey-PROD Milestones Good First Issue Good issue to work on for newcomers Type:Cleanup Cleanup tasks
Milestone

Comments

@vogelpi
Copy link
Contributor

vogelpi commented Jul 22, 2020

A couple of our auto-generated files have duplicated license headers. One copy is inserted by util/topgen.py and the other copy comes in via template file. In addition some auto-generated files do not contain the warning that they are auto-generated.

We should probably:

  1. Make sure all our templates have a license banner that does not get into the autogen file.
  2. Change topgen to only insert the license banner together with a warning that this is auto-generated to all auto-generated files.

Currently, the following files have a duplicated banner:

grep -Rc --include \*.sv SPDX- * | grep ":2"
hw/top_earlgrey/ip/clkmgr/rtl/autogen/clkmgr.sv:2                                                                                                                                                                                    
hw/top_earlgrey/ip/clkmgr/rtl/autogen/clkmgr_pkg.sv:2                                                                                                                                                                                       
hw/top_earlgrey/ip/flash_ctrl/rtl/autogen/flash_ctrl.sv:2                                                                                                                                                                                   
hw/top_earlgrey/ip/flash_ctrl/rtl/autogen/flash_ctrl_region_cfg.sv:2                                                                                                                                                                        
hw/top_earlgrey/ip/flash_ctrl/rtl/autogen/flash_ctrl_pkg.sv:2
@vogelpi vogelpi added Component:Tooling Issues related to tooling, e.g. tools/scripts for doc, code generation (docgen, reggen), CSR Type:Cleanup Cleanup tasks labels Jul 22, 2020
@tjaychen
Copy link

ooops! this is my bad.
I think it's probably a result of the ip level example not having that header (thus included in the template), and topgen.py having it.
I'll fix the clkmgr ones.

@vogelpi
Copy link
Contributor Author

vogelpi commented Jul 23, 2020

Hi @tjaychen,
no worries. I wanted to look into this at some point but will have to do some other stuff first. I also noted that some autogen files have a line saying something like "this file has been generated with the following command" and then there is no command. I thought to solve both these things in one shot.

@vogelpi vogelpi added the Good First Issue Good issue to work on for newcomers label Aug 17, 2020
@moidx moidx added this to the Backlog milestone Sep 9, 2022
@msfschaffner
Copy link
Contributor

@vogelpi is this still pending or can we close this?

@msfschaffner msfschaffner added the Earlgrey-PROD Triaged Temporary label to triage issues into Earlgrey-PROD Milestones label Oct 6, 2023
@vogelpi
Copy link
Contributor Author

vogelpi commented Oct 16, 2023

Yes, it's still an issue. For current master I got:

grep -Rc --include \*.sv SPDX- * | grep ":2"
hw/top_earlgrey/ip/flash_ctrl/rtl/autogen/flash_ctrl_region_cfg.sv:2
hw/top_earlgrey/ip/flash_ctrl/rtl/autogen/flash_ctrl.sv:2
hw/top_earlgrey/ip/flash_ctrl/rtl/autogen/flash_ctrl_pkg.sv:2
hw/top_earlgrey/ip/clkmgr/rtl/autogen/clkmgr_pkg.sv:2
hw/top_earlgrey/ip/clkmgr/rtl/autogen/clkmgr.sv:2
hw/top_earlgrey/ip/rstmgr/rtl/autogen/rstmgr_pkg.sv:2
hw/top_earlgrey/ip/rstmgr/rtl/autogen/rstmgr.sv:2
hw/top_earlgrey/ip/rstmgr/dv/sva/autogen/rstmgr_rst_en_track_sva_if.sv:2

However, this is really ultra-low priority. And I believe it would still be a good starter task.

@matutem
Copy link
Contributor

matutem commented Feb 18, 2024

These duplicate license headers don't get generated by the ipgen flow, so they will be gone once #8440 is complete. As it stands the ones in rstmgr are already gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:Tooling Issues related to tooling, e.g. tools/scripts for doc, code generation (docgen, reggen), CSR Earlgrey-PROD Triaged Temporary label to triage issues into Earlgrey-PROD Milestones Good First Issue Good issue to work on for newcomers Type:Cleanup Cleanup tasks
Projects
None yet
Development

No branches or pull requests

5 participants