Message Passing
Communicating Sequential Processes (CSP) designed by C.A.R. Hoare, is a simple robust message-passing mechanism using channels for synchronization and communication between parallel processes.
Channels are unidirectional point-to-point connections between parallel threads, where the writer and reader on a channel wait for each other before sending data.
Mobius utilizes handshaking using CSP-style channels to replace traditional concepts such as a mutex and semaphore. This allows the Mobius compiler to make significant compile-time checking and analysis.
Efficient Implementation
The Mobius source is compiled into hierarchical handshaking graphs consisting of handshaking primitives connected by handshaking channels. The handshaking primitives implement a distributed local control and data flow, making them equally suited for both control and data applications.
Mobius provides automatic flow contol making streaming and pipelining very simple.
A handshake graph can be implemented in hardware (Verilog or VHDL) or software (ansi C). Below is an illustration of how a simple Mobius source is compiled to a handshake graph and implemented in Verilog.

Correct-by-construction
Each "bubble" in the above handshaking graph is a handshaking primitive enforcing the handshaking protocol. There are a few hundred such bubbles (with different arity) including: repeat, while, seq, par, transfer, variable, channel, mux, demux, bit-load, bit-store in addition to arithmetic, logical and relational operators.
Each handshaking primitive can be seen as a tiny finite state machine (FSM), and the entire handshaking graph is a hierarchical finite state machine. In many cases, the FSM is trivial and may simply consist of wires. Because each handshaking primitive must follow a known protocol, each can be exhaustively tested in a small test environment. By creating the handshake circuit by assembling it from a set of correct-by-construction primitives, the resulting handshake circuit is also correct-by-construction.
Running a Modelsim simulation confirms the correct-by-construction behavior of the Mobius-generated circuit and testbench. Because the generated circuit is identical to the structure of the handshaking graph, it is straightforward to understand the control and dataflow. Note that the user tests & debugs the circuit by simulating and modifying the Mobius source, not by simulating and modifying the generated HDL. There is therefore minimal need for HDL simulation to verify the correct-by-construction Mobius-generated circuit.
HW or SW
Because each handshake primitive implements a FSM and is completely independent of all other handshake primitives, it can be implemented in hardware or software. This enables easy HW/SW co-design since any Mobius program can be arbitrarily partitioned to 100% hardware, 100% software, or any arbitrary mix of hardware and software.
|