Skip to content

Conversation

jackkoenig
Copy link
Contributor

@jackkoenig jackkoenig commented Mar 17, 2025

Hard to test for this but easy to validate which I did.

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

  • Feature (or new API)

Desired Merge Strategy

  • Squash

Release Notes

The old error was Cannot prove that chisel3.UInt <:< chisel3.Vec[_], the new error is Masked write requires that the data type is a Vec, got chisel3.UInt.

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) and clean up the commit message.
    • Merge: Ensure that contributor has cleaned up their commit history, then merge with Create a merge commit.

@jackkoenig jackkoenig added the Feature New feature, will be included in release notes label Mar 17, 2025
@jackkoenig jackkoenig requested a review from seldridge March 17, 2025 20:00
import chisel3.experimental.{requireIsChiselType, requireIsHardware, SourceInfo, SourceLine}

object Mem extends Mem$Intf {

@implicitNotFound("Masked write requires that the data type is a Vec, got ${T}.")
Copy link
Member

Choose a reason for hiding this comment

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

I didn't know you could reference the type here. Neat.

@mwachs5
Copy link
Contributor

mwachs5 commented Mar 17, 2025

@jackkoenig not sure which milestone to set for this

@jackkoenig
Copy link
Contributor Author

@jackkoenig not sure which milestone to set for this

Probably safe and easy to backport to 6.x, not super inclined to backport further than that these days.

@jackkoenig jackkoenig added this to the 6.x milestone Mar 17, 2025
@jackkoenig jackkoenig merged commit 93dad7f into main Mar 17, 2025
18 checks passed
@jackkoenig jackkoenig deleted the jackkoenig/better-masked-write-error branch March 17, 2025 20:38
@mergify mergify bot added the Backported This PR has been backported label Mar 17, 2025
chiselbot pushed a commit that referenced this pull request Mar 17, 2025
(cherry picked from commit 93dad7f)

# Conflicts:
#	core/src/main/scala-2/chisel3/MemIntf.scala
#	core/src/main/scala-3/chisel3/MemIntf.scala
#	core/src/main/scala/chisel3/Mem.scala
#	src/main/scala-2/chisel3/util/SRAM.scala
Copy link
Contributor

mergify bot commented Mar 17, 2025

backport

✅ Backports have been created

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 Feature New feature, will be included in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants