Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Support for Decoupled/Valid with zero-width data #552

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

kammoh
Copy link
Contributor

@kammoh kammoh commented Aug 16, 2022

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
Copy link
Contributor Author

kammoh commented Aug 17, 2022

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

@ekiwi
Copy link
Collaborator

ekiwi commented Aug 18, 2022

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 ekiwi force-pushed the enqueue_option branch 2 times, most recently from d8d04a9 to 68e2038 Compare January 11, 2023 17:13
@ekiwi ekiwi added this to the 0.6.0 milestone Jan 11, 2023
@ekiwi
Copy link
Collaborator

ekiwi commented Jan 11, 2023

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

Co-authored-by: Kamyar Mohajerani <kammoh@gmail.com>
Copy link
Collaborator

@ekiwi ekiwi left a comment

Choose a reason for hiding this comment

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

This should fix some long standing issues.

@ekiwi ekiwi merged commit 7d98ab5 into ucb-bar:main Jan 11, 2023
@kammoh kammoh deleted the enqueue_option branch July 13, 2023 17:09
@kammoh kammoh restored the enqueue_option branch July 13, 2023 17:09
@kammoh kammoh deleted the enqueue_option branch July 13, 2023 17:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants