You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This currently errors because the width of 8.U defaults to 4-bits. While for ProbeValues of normal hardware components like wires, ports, and registers, the widths obviously need to match since Probes are effectively pointers to the specific underlying hardware, literals do not actually correspond to any specific hardware so Chisel is free to pad them as necessary.
This would probably require a change to how ProbeValue is implemented--it would need to not eagerly emit a wire but rather delay emitting a Wire until the define when it knows the desired width.
Describe alternatives you've considered
It's not terrible for the user to have to cast or pad, the mechanical solution here of just writing the following works:
define(out, ProbeValue(8.U.asTypeOf(out))
(Well it will work once #4168 is merged), but obviously it would be more ergonomic if that weren't necessary.
Additional context
Include detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. Stack Overflow, gitter, Scastie.
What is the use case for implementing this feature?
The text was updated successfully, but these errors were encountered:
Type of issue: Feature Request
Is your feature request related to a problem? Please describe.
Consider the following Chisel:
Describe the solution you'd like
This currently errors because the width of
8.U
defaults to 4-bits. While for ProbeValues of normal hardware components like wires, ports, and registers, the widths obviously need to match since Probes are effectively pointers to the specific underlying hardware, literals do not actually correspond to any specific hardware so Chisel is free to pad them as necessary.This would probably require a change to how
ProbeValue
is implemented--it would need to not eagerly emit a wire but rather delay emitting a Wire until thedefine
when it knows the desired width.Describe alternatives you've considered
It's not terrible for the user to have to cast or pad, the mechanical solution here of just writing the following works:
(Well it will work once #4168 is merged), but obviously it would be more ergonomic if that weren't necessary.
Additional context
Include detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. Stack Overflow, gitter, Scastie.
What is the use case for implementing this feature?
The text was updated successfully, but these errors were encountered: