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 [2020/08/03 06:27] rajit |
language:langs:dflow [2020/12/22 10:17] rajit [Deterministic and non-deterministic merge] |
||
---|---|---|---|
Line 22: | Line 22: | ||
* Initial tokens: these are specified directly in the syntax | * Initial tokens: these are specified directly in the syntax | ||
* Copy: implicit, with the same channel is used for multiple inputs | * Copy: implicit, with the same channel is used for multiple inputs | ||
+ | * Sources and sinks have short-hand syntax. | ||
===== Function ===== | ===== Function ===== | ||
Line 42: | Line 43: | ||
</ | </ | ||
The '' | The '' | ||
+ | |||
+ | Splits with more than two outputs use the same syntax. The control token is assumed to take on an integer value specifying which output channel is used. | ||
+ | < | ||
+ | dataflow { | ||
+ | {c} I -> O0, O1, O2, ..., On | ||
+ | } | ||
+ | </ | ||
===== Controlled merge ===== | ===== Controlled merge ===== | ||
Line 51: | Line 59: | ||
} | } | ||
</ | </ | ||
- | In this example, if a 0 is received on '' | + | In this example, if a 0 is received on '' |
+ | < | ||
+ | dataflow { | ||
+ | {c} I0, I1, ..., Ik -> O | ||
+ | } | ||
+ | </ | ||
===== Implicit copy and explicit buffers ===== | ===== Implicit copy and explicit buffers ===== | ||
Line 99: | Line 112: | ||
</ | </ | ||
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: | ||
+ | < | ||
+ | dataflow { | ||
+ | {|} I0, I1 -> O, c | ||
+ | } | ||
+ | </ | ||
+ | For each output generated, the control channel '' | ||
====== Examples ====== | ====== Examples ====== |