Differences
This shows you the differences between two versions of the page.
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/04/09 19:46] rajit [Clusters and Ordering] |
||
---|---|---|---|
Line 51: | Line 51: | ||
</ | </ | ||
- | The bit-width of channel '' | + | The bit-width of channel '' |
- | 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 '' | + | 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 '' |
<code act> | <code act> | ||
Line 82: | Line 82: | ||
} | } | ||
</ | </ | ||
- | The bit-width of '' | + | The bit-width of '' |
===== Implicit copy and explicit buffers ===== | ===== Implicit copy and explicit buffers ===== | ||
Line 137: | Line 137: | ||
</ | </ | ||
For each output generated, the control channel '' | For each output generated, the control channel '' | ||
+ | This syntax is also supported for the deterministic merge. | ||
+ | <code act> | ||
+ | dataflow { | ||
+ | {*} I0, I1 -> O, c | ||
+ | } | ||
+ | </ | ||
+ | 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 ===== | ||
Line 190: | Line 196: | ||
</ | </ | ||
+ | Dataflow clusters are hints to the implementation that these dataflow elements should be grouped together---for example, by having a single control that is shared by all the elements of the cluster. | ||
+ | Finally, consider the following dataflow example: | ||
+ | <code act> | ||
+ | dataflow { | ||
+ | a + b -> c; // produce an output on channel c | ||
+ | d + e -> out // sum d and e and produce the output on out | ||
+ | } | ||
+ | </ | ||
+ | Furthermore, | ||
+ | When optimizing the dataflow block, one may decide to group the control for the two dataflow elements. However, doing so would result in deadlock, because the combined dataflow block would wait for inputs to arrive on '' | ||
+ | |||
+ | To simplify optimizations, | ||
+ | <code act> | ||
+ | dataflow { | ||
+ | order { | ||
+ | c < e | ||
+ | } | ||
+ | a + b -> c; | ||
+ | d + e -> out |