-
Notifications
You must be signed in to change notification settings - Fork 597
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
make SerializableModuleGenerator work with D/I #4003
Conversation
@@ -17,6 +19,7 @@ trait SerializableModuleParameter | |||
* }}} | |||
* 3. user should guarantee the module is reproducible on their own. | |||
*/ | |||
@instantiable |
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.
This changes the ABI of SerializableModule
, but it should be safe enough, since it only provide the new feature.
parameter, | ||
implicitly[universe.TypeTag[M]] | ||
), | ||
Definition.do_apply(construct.asInstanceOf[M with BaseModule])(UnlocatableSourceInfo) |
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.
[M with BaseModule]
is dirty since BaseModule
doesn't allowed to be extended from a trait.
In runtime, this is always safe.
a5002d8
to
7c026c8
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.
Looks fine to me, see comment on tests!
src/test/scala/chiselTests/experimental/SerializableModuleGeneratorSpec.scala
Outdated
Show resolved
Hide resolved
ec8d2c6
to
8bf66a9
Compare
8bf66a9
to
08c8f36
Compare
08c8f36
to
7e48896
Compare
* implement the instantiable SerializableModule * add test
Contributor Checklist
docs/src
?Type of Improvement
Desired Merge Strategy
Release Notes
Reviewer Checklist (only modified by reviewer)
3.6.x
,5.x
, or6.x
depending on impact, API modification or big change:7.0
)?Enable auto-merge (squash)
, clean up the commit message, and label withPlease Merge
.Create a merge commit
.