Wrote a mini CSP in static C for bare metal uC work. Needs some real-world use testing still, but I like how it turns out to be fairly simple. github.com/zwizwa/uc_tool
Conversation
I had been looking for a "mini Erlang" before, but really CSP's synchronous nature is a much better fit for static allocation. I learned a couple of surprising things doing this. See comments in csp_test.c csp.c csp.h
2
Also started porting the ideas to Seq (Haskell->Verilog macro lang) to be able to use on FPGA. I'd like to be able to write in a style that makes it possible to migrate tasks along the stack: FPGA-uC-Linux. Starting to believe this is within reach.
Replying to
I have a first draft of CSP style channels in Seq. Probably reinventing things, but deriving this was an interesting process. The trick is that while rendez-vous is symmetric in principle, inserting the delay-breaking register makes the code asymmetric.
1
See comments for closeChannel, about halfway through in github.com/zwizwa/asm_too
1
Show replies
