Algorithm 1.
Dataflow Control
| 1: def dataflow_ ctrl(): |
| 2: at every timestep do |
| 3: if pixel_in then |
| 4: for i from 0 to (nr_parallel−1) do |
| 5: store_data(pointer_in, pixel_in) |
| 6: pointer_in.x.update() |
| 7: pointer_in.y.update() |
| 8: end for |
| 9: end if |
| 10: if conditions_to_compute(pointer_in): then |
| 11: for i from (nr_parallel−1) downto 0 do |
| 12: data_pixels=read_data(pointer_in-i) |
| 13: data_to_crossbar(data_pixels) |
| 14: pointer_out.x.update() |
| 15: pointer_out.y.update() |
| 16: end for |
| 17: if pointer_out == end then |
| 18: computation_complete=True |
| 19: end if |
| 20: end if |
| 21: if conditions_to_residual(pointer_in) then |
| 22: read_res() |
| 23: end if |
| 24: end |