Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve driver vs. receiver based on usage for certain types of operations #553

Open
mkorbel1 opened this issue Jan 21, 2025 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@mkorbel1
Copy link
Contributor

Motivation

For some types of operations, one may wish to use the result of an operation as either a driver or a receiver. A common example would be swizzles or subsets.

For example, these are currently NOT supported:

// swizzle as a receiver
[a, b].swizzle() <= c;

// subset as a receiver
d.slice(3, 2) <= e;

There are other ways to achieve these (e.g. assignSubset, withSet), but there's still some desire to assign these, especially for those coming from SystemVerilog.

Desired solution

Create a way for some implementer of Logic to determine "late" whether it should behave as a driver or a receiver. Upon connection to another signal, it can determine whether it should act as a driver or a receiver. This mechanism can be reused for multiple scenarios, including the examples above.

Alternatives considered

No response

Additional details

No response

@mkorbel1 mkorbel1 added the enhancement New feature or request label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant