Skip to content

Conversation

mwachs5
Copy link
Contributor

@mwachs5 mwachs5 commented May 28, 2024

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 request a desired merge strategy?
  • Did you add text to be included in the Release Notes for this change?

Type of Improvement

  • Bugfix

Fixes #4102.

Now supported are FlatIO of:

  • Probe(Element)
  • Probe(Aggregate)
  • Aggregate(Probes)
  • Aggregates containing any of the above

The tests here are all in FixedIOModules but really they are fixes to FlatIO.

Desired Merge Strategy

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

Release Notes

Fix for #4102. Now supported are FlatIO (and therefore FixedIO___Module) of:

  • Probe(Element)
  • Probe(Aggregate)
  • Aggregate(Probes)
  • Aggregates containing any of the above

Reviewer Checklist (only modified by reviewer)

  • Did you add the appropriate labels? (Select the most appropriate one based on the "Type of Improvement")
  • Did you mark the proper milestone (Bug fix: 3.6.x, 5.x, or 6.x depending on impact, API modification or big change: 7.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.

mwachs5 added 3 commits May 28, 2024 13:23
- test fails with :<>=
- make FixedIO___Modules work with Probe type IOs of Elem types
- commented out code that doesn't work for Probe Type IOs of Aggregate types
@mwachs5 mwachs5 added the Bugfix Fixes a bug, will be included in release notes label May 28, 2024
@jackkoenig
Copy link
Contributor

One thing that would probably help would be to fix reifySingleData to return Some of the Data when that Data is not a view, namely tweak this line:

That should become case Some(_) => Some(data)

@jackkoenig
Copy link
Contributor

But we really ought to add an alternative to reifySingleData to return Either[Seq[Data], Data], where Right[Data] means it's a single Data and Left[Seq[Data]] means it's more than 1 Data, and that Seq is the Data it reifies to. Would be super helpful for error messages and things like .toString.

@mwachs5
Copy link
Contributor Author

mwachs5 commented May 28, 2024

i guess i'd rather get this actually working for one of the aggregate cases before worrying about which reify to use... i am bashing my head against why FlatIO does not work for probes

@mwachs5 mwachs5 changed the title FixedIO__Modules with Probe[Element] FixedIO__Modules with various kinds of probe ports May 29, 2024
@mwachs5 mwachs5 marked this pull request as ready for review May 29, 2024 18:27
Copy link
Member

@dtzSiFive dtzSiFive left a comment

Choose a reason for hiding this comment

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

LGTM!! Left some feedback! Thanks!!

Awesome tests!!

@mwachs5 mwachs5 added this to the 7.0 milestone May 29, 2024
@mwachs5 mwachs5 merged commit 0553b69 into main May 30, 2024
@mwachs5 mwachs5 deleted the probes-and-fixedio branch May 30, 2024 01:45
@jackkoenig jackkoenig modified the milestones: 7.0, 5.x May 30, 2024
@jackkoenig jackkoenig added this to the 6.x milestone May 30, 2024
@mergify mergify bot added the Backported This PR has been backported label May 30, 2024
mergify bot pushed a commit that referenced this pull request May 30, 2024
* - add probe IOs to FixedIOModuleSpec
* getMatchedFields: don't recurse through probes.
* update scaladoc for FlatIO for probe types

---------

Co-authored-by: Will Dietz <will.dietz@sifive.com>
(cherry picked from commit 0553b69)

# Conflicts:
#	core/src/main/scala/chisel3/Data.scala
chiselbot pushed a commit that referenced this pull request May 30, 2024
…4111)

* FixedIO__Modules with various kinds of probe ports  (#4105)

* - add probe IOs to FixedIOModuleSpec
* getMatchedFields: don't recurse through probes.
* update scaladoc for FlatIO for probe types

---------

Co-authored-by: Will Dietz <will.dietz@sifive.com>
(cherry picked from commit 0553b69)

# Conflicts:
#	core/src/main/scala/chisel3/Data.scala

* Update Data.scala

---------

Co-authored-by: Megan Wachs <megan@sifive.com>
Co-authored-by: Jack Koenig <koenig@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 Bugfix Fixes a bug, will be included in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FixedIO__Module doesn't work with Probe-type top-level ports
3 participants