Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
language:langs:dflow [2020/08/09 11:44]
rajit [Split]
language:langs:dflow [2020/12/22 10:17]
rajit [Deterministic and non-deterministic merge]
Line 59: Line 59:
 } }
 </code> </code>
-In this example, if a 0 is received on ''c'', then the data token on ''I0'' is sent to the output ''O''.+In this example, if a 0 is received on ''c'', then the data token on ''I0'' is sent to the output ''O''Multi-way merges use a syntax analogous to splits: 
 +<code> 
 +dataflow { 
 +  {c} I0, I1, ..., Ik -> O 
 +
 +</code>
  
 ===== Implicit copy and explicit buffers ===== ===== Implicit copy and explicit buffers =====
Line 107: Line 112:
 </code> </code>
 Note that this introduces an arbiter.  Note that this introduces an arbiter. 
 +
 +Often it is helpful to know what decision was made by the arbiter. To support this, we permit an optional second channel on the right hand side of the dataflow expression as follows:
 +<code>
 +dataflow {
 + {|} I0, I1 -> O, c
 +}
 +</code>
 +For each output generated, the control channel ''c'' will produce a 0 or 1 token depending on the choice made by the arbiter.
  
 ====== Examples ====== ====== Examples ======