-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Chisel Linting Framework #2435
Chisel Linting Framework #2435
Conversation
This looks great overall. I would be more specific than just "linting" since there are other possible lint rules we may want to add some day. I would call this |
Can't we fix 80+% of these with |
... or perhaps the |
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.
rocket changes lgtm.
Yeah I think |
Seems like an ok way to document |
Yeah, @chiselName didn't fix the majority of these. I think there is a serious bug, but in the meantime this PR highlights where we can fix these. |
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.
Thanks!
Your PR mentions modules, but I think you only fixed registers. Does that mean unnamed
Modules aren’t detected by the linter, or aren’t actually present?
In general I see the naming algorithm you applied, but in some cases when you had to make up a name you said “reg_foo” and in others “foo_reg”, not sure if that was intentional in those cases? FWIW I prefer the latter
Ok so my plan is to make this PR only add the Linting transform and options, but not run the linter by default and not include any of the name fixes so all the regressions pass. That will let us incrementally change names but still get this PR in. |
This reverts commit d652811.
This reverts commit 52d9fef.
This reverts commit a3b472f.
* Update some uses of @chiselName to disable new prefixing behavior * Update Stage/Phase dependencies to new Dependency instead of Class * Technically bumped to merge-base of each tag with their respective release branches: 3.3.x for chisel3 and 1.3.x for firrtl This better supports Wit dependencies * Include all chisel3 class files on FIRRTL run classpath * Bump api-chisel3-sifive to resolve Wit conflicts and bump api-scala-sifive to support Wit >= v0.13.0
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.
Generally looks good. A few nits but I'm okay with leaving them for later improvement
src/main/scala/diplomaticobjectmodel/logicaltree/RocketLogicalTreeNode.scala
Outdated
Show resolved
Hide resolved
No longer including changes to rocketchip RTL
* Update some uses of @chiselName to disable new prefixing behavior * Update Stage/Phase dependencies to new Dependency instead of Class * Technically bumped to merge-base of each tag with their respective release branches: 3.3.x for chisel3 and 1.3.x for firrtl This better supports Wit dependencies * Include all chisel3 class files on FIRRTL run classpath * Bump api-chisel3-sifive to resolve Wit conflicts and bump api-scala-sifive to support Wit >= v0.13.0
@azidar hey sorry I force pushed the |
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, but please retarget against master
Type of change: new feature
Impact: API Addition
Development Phase: implementation
Release Notes
Summary
There have been many instances where consumers of rocket-chip Verilog have to run LEC tools, debuggers, physical design tools. When registers don't have stable names, changes to the generator cause changes to the names of registers, making the lives of those downstream more difficult.
This PR adds the following:
To try it out:
To see the compiler options, run with:
TODO: