Resolve driver vs. receiver based on usage for certain types of operations
- Dominant language
- Dart
- Stars
- 489
- Forks
- 88
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 10
Description
### 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:
```dart
// 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_
Contributor guide
Assessment
This issue has not been assessed yet.