Skip to content

Distinguish LHS/RHS in connect/bulkConnect hardware error - #5491

Merged
jackkoenig merged 1 commit into
chipsalliance:mainfrom
mumallaeng:requireishardware-connect-message
Sep 21, 2026
Merged

jackkoenig merged 1 commit into
chipsalliance:mainfrom
mumallaeng:requireishardware-connect-message

Conversation

@mumallaeng

Copy link
Copy Markdown
Contributor

Summary

Data.connect and Data.bulkConnect both called requireIsHardware(this, ...) and requireIsHardware(that, ...) with the exact same message on both sides ("data to be connected" / "data to be bulk-connected"). When one operand was a bare Chisel type instead of hardware, the resulting error gave no way to tell whether it was the left-hand or right-hand side that needed to be wrapped in Wire(_)/IO(_).

This gives each side its own message so the error names which one is at fault, for both := (connect) and <> (bulkConnect). Added four cases to the existing "Connect error messages should have meaningful information" test in ConnectSpec: a bare LHS and a bare RHS, for both connect and bulkConnect.

Closes #1170.

Release Notes

Error messages for connecting a non-hardware (bare Chisel type) operand via := or <> now specify whether the left-hand or right-hand side was the problem, instead of an ambiguous message that didn't distinguish the two.

Data.connect and Data.bulkConnect both called requireIsHardware(this, ...)
and requireIsHardware(that, ...) with the exact same message on both
sides ("data to be connected" / "data to be bulk-connected"). When one
operand was a bare Chisel type instead of hardware, the resulting error
gave no way to tell whether it was the left-hand or right-hand side that
needed to be wrapped in Wire(_)/IO(_).

Give each side its own message so the error names which one is at
fault, for both := (connect) and <> (bulkConnect).

Add four cases to the existing "Connect error messages should have
meaningful information" test in ConnectSpec: a bare LHS and a bare RHS,
for both connect and bulkConnect.

Closes chipsalliance#1170.
@linux-foundation-easycla

linux-foundation-easycla Bot commented Sep 20, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: mumallaeng / name: mumallaeng (d7848dd)

@jackkoenig jackkoenig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is great, thank you for the improvement!

@jackkoenig jackkoenig added the Bugfix Fixes a bug, will be included in release notes label Sep 21, 2026
@jackkoenig
jackkoenig enabled auto-merge (squash) September 21, 2026 18:15
@jackkoenig
jackkoenig merged commit 6a43b9a into chipsalliance:main Sep 21, 2026
30 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugfix Fixes a bug, will be included in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect Error Message in Data.connect(...)

2 participants