chiseltest icon indicating copy to clipboard operation
chiseltest copied to clipboard

Support for Decoupled/Valid with zero-width data

Open kammoh opened this issue 2 years ago • 2 comments

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.

kammoh avatar Aug 16 '22 20:08 kammoh

CI failures seem to be completely unrelated. (One is probably a bug in Verilator caching?)

kammoh avatar Aug 17 '22 02:08 kammoh

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.

ekiwi avatar Aug 18 '22 14:08 ekiwi

@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.

ekiwi avatar Jan 11 '23 17:01 ekiwi