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

Added migration for inferModuleReset #2571

Merged
merged 6 commits into from
Jun 8, 2022
Merged

Added migration for inferModuleReset #2571

merged 6 commits into from
Jun 8, 2022

Conversation

azidar
Copy link
Contributor

@azidar azidar commented Jun 8, 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?
  • 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?

I didn't add more comprehensive ScalaDoc. I will add that once we add migration options for all the compilation options.

Type of Improvement

API Impact

Adds another optional field to CompileOptions to migrate inferModuleReset.

Desired Merge Strategy

Squash

Release Notes

Added an optional field to CompileOptions to help users migrate the inferModuleReset compile option.

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 do one of the following when ready to merge:
    • Squash: You/ the contributor Enable auto-merge (squash), clean up the commit message, and label with Please Merge.
    • Merge: Ensure that contributor has cleaned up their commit history, then merge with Create a merge commit.

@azidar azidar requested a review from jackkoenig June 8, 2022 16:51
Copy link
Contributor

@jackkoenig jackkoenig left a comment

Choose a reason for hiding this comment

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

Some tiny nits and then some food for thought

Comment on lines +15 to +25
val migrateIR = new chisel3.CompileOptions {
val connectFieldsMustMatch = false
val declaredTypeMustBeUnbound = false
val dontTryConnectionsSwapped = false
val dontAssumeDirectionality = false
val checkSynthesizable = false
val explicitInvalidate = false
val inferModuleReset = false

override val migrateInferModuleReset = true
}
Copy link
Contributor

Choose a reason for hiding this comment

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

If we're going to adopt this new technique of "migration" compile options, I think we should consider some factory methods to construct them from Strict and NotStrict, I'm thinking something like:

object CompileOptions {
  def migrationFromStrict(migrateInferModuleReset: Boolean = false): CompileOptions = ...
}

Anyway, I don't think it should be part of this PR, but if we are to sort of standardize on this technique I think a little bit of help for users would be warranted, otherwise this is a very power user-y API.

@jackkoenig jackkoenig added this to the 3.4.x milestone Jun 8, 2022
azidar and others added 4 commits June 8, 2022 10:31
Co-authored-by: Jack Koenig <koenig@sifive.com>
Co-authored-by: Jack Koenig <koenig@sifive.com>
Co-authored-by: Jack Koenig <koenig@sifive.com>
Co-authored-by: Jack Koenig <koenig@sifive.com>
@jackkoenig jackkoenig enabled auto-merge (squash) June 8, 2022 18:46
@jackkoenig jackkoenig added the Please Merge Accepted PRs that are ready to be merged. Useful when waiting on CI. label Jun 8, 2022
@jackkoenig jackkoenig merged commit 3c6c044 into master Jun 8, 2022
@jackkoenig jackkoenig deleted the migrate-chisel branch June 8, 2022 19:29
mergify bot pushed a commit that referenced this pull request Jun 8, 2022
Co-authored-by: Jack Koenig <koenig@sifive.com>
(cherry picked from commit 3c6c044)

# Conflicts:
#	core/src/main/scala/chisel3/Module.scala
mergify bot pushed a commit that referenced this pull request Jun 8, 2022
Co-authored-by: Jack Koenig <koenig@sifive.com>
(cherry picked from commit 3c6c044)
@mergify mergify bot added the Backported This PR has been backported label Jun 8, 2022
mergify bot added a commit that referenced this pull request Jun 8, 2022
Co-authored-by: Jack Koenig <koenig@sifive.com>
(cherry picked from commit 3c6c044)

Co-authored-by: Adam Izraelevitz <adam.izraelevitz@sifive.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported This PR has been backported 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.

2 participants