-
Notifications
You must be signed in to change notification settings - Fork 603
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
RFC: Add Rocket Chip-style clonemodule as CloneAndGetIO to experimental #943
RFC: Add Rocket Chip-style clonemodule as CloneAndGetIO to experimental #943
Conversation
Are there some tests to show how this is supposed to work for users? How does this interact with the full CloneModule proposal you brought up a few weeks ago? |
@albert-magyar I agree with @edwardcwang , can we see some tests demonstrating the new API? |
50051a1
to
358109a
Compare
@azidar @edwardcwang I added some Scaladoc / tests. |
The idea is that can co-exist alongside a |
@terpstra FYI |
Thanks Albert for the tests/examples. Just added some additional questions. |
78300f3
to
8210c3f
Compare
@stevenmburns (sorry I should have tagged you earlier), it would be interesting to see if this would work for your use case. |
This looks good to me. I can use it to do what I want this way:
It is a little bit of a pain to have to do the first instance a little differently than the rest. I tried to do all eight using CloneModuleAndGetIO, but then Also, the name is probably not correct. Maybe |
@stevenmburns, I actually am out today for the development meeting, but I talked to @jackkoenig, and he’ll review after I finalize the PR today. It will be in this weekend. |
8210c3f
to
6face4f
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.
LGTM
Resolves #618 |
Related issue: #618
Type of change: feature request
Impact: API addition (no impact on existing code)
Development Phase: proposal && implementation
EXAMPLE USAGE
Release Notes:
This is a port of Rocket Chip's
CloneModule
functionality (which returns aRecord
) aschisel3.experimental.CloneAndGetIO
. This simplifies the implementation drastically, as it can live inside chisel3. The idea here is that there may be some desire to have this live alongside a fullCloneModule
implementation that returns aModule
, as the API for using theRecord
-returning version is much simpler for basic use cases.Pros: it makes the simple use cases simple. Also, I am almost positive that anything returning something more module-like would have also have large, non-overlapping caveats associated with its use, which incentivizes having both variants.
Cons: it might be confusing to have both
CloneAndGetIO
and another version ofCloneModule
that returns aModule
. Also, more API features means more to support ad infinitum.