HOME   PREV   NEXT (Synthesis from C and other programing languages.)

Channel Communications

Using shared variables to communicate between threads requires that the user abides by self-imposed protocol conventions.

Typical patterns are:

Some protocols cannot be pipelined, some degrade throughput when pipelined and others are designed for it (see later slide pack).

Some approaches completely ban shared variables and enforce use of channels (Handel-C and the main Bluespec dialect).

Handel-C (Handlec.pdf) was promoted by Oxford/Celoxica for rapid hardware design.

Handel-C uses Occam/CSP-like channels (pling to write, query to read).

   while (1)              while(1)              while(1)
   {                      {                     {
     ch1 ! (x);             ch2 ! (ch1? + 2)      $display(ch2?);
     x += 3;              }                     }
   }

Using channels allows synthesis to re-time the design. Handshaking wires may dissapear during synthesis.

Bluespec Verilog takes a similar, but richer approach and also provides rule-based programming (see next section).