Closed bgamari closed 7 months ago
I have opened https://github.com/cchalmers/circuit-notation/pull/17 addressing this.
Does this actually compile? I think the plugin would handle Signal reg1 <- ...
"correctly" as discussed in the PR, but I'm not sure how it would magically change CSignal
to Signal
.
It doesn't. I realized that after opening it that upstream has shifted appreciably. Unfortunately it's not entirely clear to me how to account for these changes (particularly the addition of tagBundlePat
, et al.) in clash-protocols.
That PR went in before I could properly understand it. I didn't even realize it had downstream consequences :(.
We've bumped to the latest circuit-notation
in https://github.com/clash-lang/clash-protocols/pull/61. I think we've cleared up the confusion in the meantime. If that's incorrect please re-open the issue @bgamari.
Currently
clash-protocols
provides theCSignal
type for use inCircuit
s. This in principle allows us to writeCircuit
s like (roughly modelling myaxi-register
package):Note that use of
Signal
patterns and expressions insumRegs
. As far as I can tell, this syntactic construct ofcircuit-notations
allows the user to bind/use a unidirectional signal. However, I suspect that this currently doesn't work inclash-protocols
asCSignal
must be used in place ofSignal
inCircuit
s. My suspicion is that fixing this in the plugin should be quite straightforward.Also see #58, which describes some confusion surrounding
CSignal
.