chiseltest
chiseltest copied to clipboard
Support for Decoupled/Valid with zero-width data
As discussed in #35, chiseltest
does not currently support zero-width data/ports.
This PR provides a solution (well, maybe a workaround) specific to Decoupled
and Valid
interfaces. Decoupled interfaces with zero-width data can also be used
as a control/synchronization handshake where no data exchange is required.
Here we take an explicit approach: the designer knows the
width of data at instantiation and can accordingly utilize appropriate
Option[Data]
values.
CI failures seem to be completely unrelated. (One is probably a bug in Verilator caching?)
Thanks for the PR. I think there might be a more general solution for 0-bit wires which is why I would rather not merge this yet.
@kammoh Could you have a look at my changes and see if this addresses your problem? I did remove your option to pass Option[Data]
to enqueue. Instead you can now just pass 0.U
for any 0-bit signal. Bundles with 0-bit signals now don't need those to be set, even when not using pokePartial
.