[core] Use DataProduct for FixedIO*Module#5354
Draft
seldridge wants to merge 2 commits into
Draft
Conversation
Relax the types that are supported by the `FixedIO*` family of modules. Previously, these routed all IO through a single `A <: Data`. Change this so that this is now any `A` with a type class implementation of `DataProduct`. This is primarily motivated by the desire to add domain information to the `FixedIO*` family of modules. Whole types must be single-domain and domain types must be separate ports. This, together, means that it was previously impossible to add any domain information to any `FixedIO*` module except through domain inference in a FIRRTL compiler. This requires special handling in both Scala 2 and Scala 3 for D/I support. In order to test this, extend the existing Scala 2-only test to stress tuples and sequences of Data and move it into the common testing area so that it is run by both Scala versions. Note: this currently produces default, sub-optimal names for things that are tuples. This can be fixed in the future by allowing `suggestName` to work on the tuples. However, this requires deeper changes and this is better factored into a later commit. Assisted-by: pi.dev:claude-opus-4-7 Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Member
Author
|
This is still not exactly the right shape. It's not really using This is somewhat hard to untangle and I'd like to get some input from @jackkoenig once he has a chance to look at / think about this. I wouldn't look too deeply at the code just now other than at the tests (as this is very much LLM-generated at this point with very minimal review 😬). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relax the types that are supported by the
FixedIO*family of modules.Previously, these routed all IO through a single
A <: Data. Change thisso that this is now any
Awith a type class implementation ofDataProduct.This is primarily motivated by the desire to add domain information to the
FixedIO*family of modules. Whole types must be single-domain anddomain types must be separate ports. This, together, means that it was
previously impossible to add any domain information to any
FixedIO*module except through domain inference in a FIRRTL compiler.
This requires special handling in both Scala 2 and Scala 3 for D/I
support. In order to test this, extend the existing Scala 2-only test to
stress tuples and sequences of Data and move it into the common testing
area so that it is run by both Scala versions.
Note: this currently produces default, sub-optimal names for things that
are tuples. This can be fixed in the future by allowing
suggestNametowork on the tuples. However, this requires deeper changes and this is
better factored into a later commit.
Assisted-by: pi.dev:claude-opus-4-7
Release Notes
Support any type that has a
DataProductimplementation in theFixedIO*family of modules. This is both more flexible and will enable domain
information to be added to this module family.