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 [2023/02/02 14:36]
rajit [Split]
language:langs:dflow [2023/02/11 12:04]
rajit [Deterministic and non-deterministic merge]
Line 51: Line 51:
 </code> </code>
  
-The bit-width of channel ''c'' should be at most the number of bits needed to specify the number of outputs. If the value of the token on ''c'' is not within the range ''0'' to ''n'' (for ''n+1'' channels on the right hand side), then the dataflow component can fail in an unspecified manner.+The bit-width of channel ''c'' should be at most the number of bits needed to specify the number of outputs. If the value of the token on ''c'' is not within the range ''0'' to ''n'' (for ''n+1'' channels on the right hand side), then the dataflow component can fail in an unspecified manner. Furthermore, the bit-widths of all the data channels  (''I'', ''O0'', etc above) must be the same.
  
-The control channel, input data, and output data can only be channels. If a control expression is needed, one must use a combination of a split as well as a function. For example, if a split takes an input from ''A'' and sends it to ''X'' if ''c=0'' and ''Y' otherwise, then the following is a syntax error:+The control channel, input data, and output data can only be channels. If a control expression is needed, one must use a combination of a split as well as a function. For example, if a split takes an input from ''A'' and sends it to ''X'' if ''c=0'' and ''Y'' otherwise, then the following is a syntax error:
  
 <code act> <code act>
Line 82: Line 82:
 } }
 </code> </code>
-The bit-width of ''c'' has analogous constraints as in the case of a split.+The bit-width of ''c'' has analogous constraints as in the case of a split, and it also has similar syntax restrictions.
 ===== Implicit copy and explicit buffers ===== ===== Implicit copy and explicit buffers =====
  
Line 137: Line 137:
 </code> </code>
 For each output generated, the control channel ''c'' will produce a 0 or 1 token depending on the choice made by the arbiter. For each output generated, the control channel ''c'' will produce a 0 or 1 token depending on the choice made by the arbiter.
 +This syntax is also supported for the deterministic merge.  
 +<code act> 
 +dataflow { 
 + {*} I0, I1 -> O, c 
 +
 +</code> 
 +In both these cases, the control output channel must have the exact bitwidth needed to specify which input token was routed to the output.
 ===== Sink ===== ===== Sink =====