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

Fix Boring.rwTap on instance ports #4451

Merged
merged 6 commits into from
Oct 8, 2024

Conversation

azidar
Copy link
Contributor

@azidar azidar commented Oct 7, 2024

Previous behavior would always put the new probe expression in the instance's module body, but this is incompatible with instances built with Instantiate.

Given FIRRTL now supports this, we can improve this API.

Additionally, added a few more D/I + BoringUtils tests

Contributor Checklist

  • [N/A] 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

Desired Merge Strategy

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

Release Notes

BoringUtils.rwTap can now works on a port of an instance: Instance[..]

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.

Previous behavior would always put the new probe expression in the
instance's module body, but this is incompatible with instances built
with Instantiate.

Given FIRRTL now supports this, we can improve this API.

Additionally, added a few more D/I + BoringUtils tests
@azidar azidar requested a review from dtzSiFive October 7, 2024 21:27
@azidar azidar added the Bugfix Fixes a bug, will be included in release notes label Oct 7, 2024
@azidar azidar added this to the 3.6.x milestone Oct 7, 2024
@azidar azidar force-pushed the azidar-bugfix-boring-utils-rwtaps-ok-on-ports branch from de958f3 to b2ecd34 Compare October 7, 2024 21:41
@azidar azidar requested a review from mwachs5 October 7, 2024 23:33
@jackkoenig jackkoenig modified the milestones: 3.6.x, 6.x Oct 8, 2024
@jackkoenig
Copy link
Contributor

@azidar I changed Milestone to 6.x because BoringUtils implemented in Chisel has only existed since v6.0.0-M1. Feel free to change back if you were still planning to backport to 5.x and 3.6.x.

@jackkoenig
Copy link
Contributor

In fact maybe we shouldn't backport at all since presumably firtool used with 6.x doesn't support it? Unclear.

@azidar azidar force-pushed the azidar-bugfix-boring-utils-rwtaps-ok-on-ports branch from 7e6ea3c to a0c16e6 Compare October 8, 2024 15:30
)()
}

it should "work to tap an Instance[..]'s port" in {
Copy link
Contributor

Choose a reason for hiding this comment

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

this looks good, wondering if you wouldn't want a similar test to the one above where if you tap to a Probe port it should work. But not blocking my review on that

Copy link
Contributor

@mwachs5 mwachs5 left a comment

Choose a reason for hiding this comment

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

could add more test (unless I am missing them) for normal tap to a Probe port should work. And should it fail if you try to rwTap to a Probe Port? tap to a RWProbePort? can add those cases later though as they are sort of unrelated to what you are fixing, i think?

@azidar azidar enabled auto-merge (squash) October 8, 2024 16:15
@azidar azidar merged commit 3bbf860 into main Oct 8, 2024
14 checks passed
@azidar azidar deleted the azidar-bugfix-boring-utils-rwtaps-ok-on-ports branch October 8, 2024 16:17
@mergify mergify bot added the Backported This PR has been backported label Oct 8, 2024
mergify bot pushed a commit that referenced this pull request Oct 8, 2024
* Fix Boring.rwTap on instance ports

Previous behavior would always put the new probe expression in the
instance's module body, but this is incompatible with instances built
with Instantiate.

Given FIRRTL now supports this, we can improve this API.

Additionally, added a few more D/I + BoringUtils tests

* Added test of rwTap on RWProbe

* Testing tap of instance probe port

(cherry picked from commit 3bbf860)

# Conflicts:
#	src/main/scala/chisel3/util/experimental/BoringUtils.scala
#	src/test/scala/chiselTests/BoringUtilsTapSpec.scala
debs-sifive pushed a commit that referenced this pull request Oct 15, 2024
* Fix Boring.rwTap on instance ports

Previous behavior would always put the new probe expression in the
instance's module body, but this is incompatible with instances built
with Instantiate.

Given FIRRTL now supports this, we can improve this API.

Additionally, added a few more D/I + BoringUtils tests

* Added test of rwTap on RWProbe

* Testing tap of instance probe port
chiselbot pushed a commit that referenced this pull request Nov 25, 2024
* Fix Boring.rwTap on instance ports (#4451)

* Fix Boring.rwTap on instance ports

Previous behavior would always put the new probe expression in the
instance's module body, but this is incompatible with instances built
with Instantiate.

Given FIRRTL now supports this, we can improve this API.

Additionally, added a few more D/I + BoringUtils tests

* Added test of rwTap on RWProbe

* Testing tap of instance probe port

(cherry picked from commit 3bbf860)

# Conflicts:
#	src/main/scala/chisel3/util/experimental/BoringUtils.scala
#	src/test/scala/chiselTests/BoringUtilsTapSpec.scala

* Resolve backport conflicts

---------

Co-authored-by: Adam Izraelevitz <[email protected]>
Co-authored-by: Jack Koenig <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.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.

3 participants