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

Utils: add source locators #2496

Merged
merged 18 commits into from
Apr 29, 2022
Merged

Utils: add source locators #2496

merged 18 commits into from
Apr 29, 2022

Conversation

mwachs5
Copy link
Contributor

@mwachs5 mwachs5 commented Apr 19, 2022

Contributor Checklist

  • Did you add Scaladoc to every public function/method?
  • Did you add at least one test demonstrating the PR?
  • Did you delete any extraneous printlns/debugging code?
  • Did you specify the type of improvement?
  • [N/A] Did you add appropriate documentation in docs/src?
  • Did you state the API impact?
  • Did you specify the code generation impact?
  • Did you request a desired merge strategy?
  • Did you add text to be included in the Release Notes for this change?

Type of Improvement

  • performance improvement
  • backend code generation

API Impact

This adds implicits to Cat, Reg utils and Bitwise Utils. Which I think is a backwards-incompatible API change though no user code should actually have to change.

I renamed one of the SourceInfoTransform functions to match the pattern where we make it match the name of the arguments exactly, and had to update Mem.scala to match.

Backend Code Generation Impact

The resulting code will have more useful source locators for any utils.

Desired Merge Strategy

  • Squash: The PR will be squashed and merged (choose this if you have no preference.

Release Notes

Add source locators for util functions Cat, those in Bitwise, and those in Reg

Reviewer Checklist (only modified by reviewer)

  • Did you add the appropriate labels?
  • Did you mark the proper milestone (Bug fix: 3.4.x, [small] API extension: 3.5.x, API modification or big change: 3.6.0)?
  • Did you review?
  • Did you check whether all relevant Contributor checkboxes have been checked?
  • Did you mark as Please Merge?

@mwachs5 mwachs5 requested a review from jackkoenig April 19, 2022 18:31
@mwachs5
Copy link
Contributor Author

mwachs5 commented Apr 19, 2022

For example this is now the output for the test added in CatSpec:

[info]   "circuit MyModule :
[info]     module MyModule :
[info]       input in : UInt<8>[2]
[info]       output out : UInt
[info]   
[info]       node _out_T = cat(in[0], in[1]) @[CatSpec.scala 69:17]
[info]       out <= _out_T @[CatSpec.scala 69:11]

before this change:

[info]   "circuit MyModule :
[info]     module MyModule :
[info]       input in : UInt<8>[2]
[info]       output out : UInt
[info]   
[info]       node _out_T = cat(in[0], in[1]) @[Cat.scala 32:95]
[info]       out <= _out_T @[CatSpec.scala 69:11]

@mwachs5 mwachs5 marked this pull request as ready for review April 20, 2022 18:10
@mwachs5 mwachs5 added this to the 3.6.0 milestone Apr 20, 2022
Copy link
Contributor

@chick chick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I did not go deep in analysis
but code reads well and tests look good

@mwachs5 mwachs5 added the Please Merge Accepted PRs that are ready to be merged. Useful when waiting on CI. label Apr 29, 2022
@mergify mergify bot merged commit b24f09c into master Apr 29, 2022
@mergify mergify bot deleted the cat-sourcelocators branch April 29, 2022 08:44
@sequencer sequencer mentioned this pull request May 3, 2022
14 tasks
sequencer added a commit that referenced this pull request May 3, 2022
sequencer added a commit to chipsalliance/rocket-chip that referenced this pull request May 13, 2022
sequencer added a commit to chipsalliance/rocket-chip that referenced this pull request May 13, 2022
sequencer added a commit to OpenXiangShan/XiangShan that referenced this pull request May 25, 2022
poemonsense pushed a commit to OpenXiangShan/XiangShan that referenced this pull request May 26, 2022
jackkoenig pushed a commit that referenced this pull request Feb 28, 2023
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Please Merge Accepted PRs that are ready to be merged. Useful when waiting on CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants