State machine semantics
It is becoming increasingly clear that manually writing state machines is not the most fun thing one can do, so if we can do something about that, it would be great.
This discussion came up due to https://discord.com/channels/962274366043873301/962274366501031957/1164633190477082696, but here is a summary of my thoughts
In the words of Julian of Pipeline-C fame
So much of digital design is:
a) pipelines
b) state machines connecting pipelines together
(auto
😏 ) pipelining and state machines seem to make great core language features
We do well with a)
but less so with b)
There is lots of previous work in this area:
All of these have software-like description that maps to FSMs. PipelineC is the most "automated" while silice is more explicit.
Bifröst's semantics seem to be similar to Calyx with actions being performed by imperative code.
Something which I don't think has been explored is coroutines. Example by Oliver Faure
entity foobar(clk: clk, value: bool) -> int<8> {
loop {
if x {
yield 42;
yield 0;
}
else {
yield 50;
}
}
}
Perhaps this is an interesting direction to explore further if we want to do something new.
Other random notes
- Graphical https://research.chalmers.se/en/publication/522451 FSM stuff (probably not viable here, but still)