-
Notifications
You must be signed in to change notification settings - Fork 74
Peeking zero-width I/Os #35
Comments
Hmm. This would be easy to do, perhaps as a mode where you can poke or peek anything you want without erroring. But treadle only has symbols for things that have survived all the way to low firrtl. so it would not otherwise know that the signal is zero length, it just simply isn't there, right? |
Yeah, that's the tricky part methinks... Zero-width signals do indeed disappear in low-FIRRTL. I guess this is the inverse of #2. |
Perhaps zero-width signals shouldn't disappear in low-FIRRTL? Even in Chisel frontend we kind of have a distinction between zero-width signals and optional Bundle fields, and zero width signals could be considered to be a form of design intent? |
Well, zero-width wires are also a Chisel/Chirrtl thing and don't actually exist in hardware... |
Annotations |
Addresses a similar to ucb-bar#35, specifically for Decoupled and Valid interfaces. Decoupled interfaces with zero-width data can also be used as a control/synchronization handshake where no data payload exists. Here we take an explicit approach: the designer knows the with of data at instatiation and can accordingly utilize appropriate Option[Data] values.
Addresses a similar to ucb-bar#35, specifically for Decoupled and Valid interfaces. Decoupled interfaces with zero-width data can also be used as a control/synchronization handshake where no data payload exists. Here we take an explicit approach: the designer knows the with of data at instatiation and can accordingly utilize appropriate Option[Data] values.
This should be fixed by: 7d98ab5 |
While I know that zero-width I/Os don't really exist, it might be nice as syntactic sugar to be able to peek (or even dummy poke?) zero-width wires and have it return 0. This is especially useful in generators where parameters might be set in a way such that some wires end up with zero-width.
This might also be a treadle issue... @chick ?
Not super high priority since it can be worked around with some if statements.
Currently it fails with a slightly cryptic message:
The text was updated successfully, but these errors were encountered: