clash-lang / clash-lang/clash-protocols
Implement custom type class when leaving a Forward unconnected using circuit-notation
- Dominant language
- Haskell
- Stars
- 25
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
When using circuit notation and explicitly ignoring a stream using `_` like so:
```
board = circuit \in -> inp
(a, _b) <- idC -< inp
idC -< a
```
The `Default` type class is used to generate `Bwd` to feed into `_b` stream. This is undocumented and also dangerous if you happen to have a `Default` implementation for a Protocol Backwards that does not ack the `Forward` leading to a deadlock.
We want a seperate type class that defines the backwards that will be used by circuit-notation to drive the backwards of a black holed stream. The easiest way is probably is to define this in plugin itself. Or make the function name an argument to the plugin.
I think the function [`completeUnderscores`](https://github.com/cchalmers/circuit-notation/blob/master/src/CircuitNotation.hs#L1171-L1188) needs to be modified to do this.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.