clash-lang / clash-lang/clash-protocols

Implement custom type class when leaving a Forward unconnected using circuit-notation

Open
#92 0 comments 0 reactions 1 assignee Claimed by @t-wallet View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.