Dataflow architectures
WHAT is a dataflow architecture?
The three ideas you must never forget:
- Program = graph, not a list.
- Execution rule = "fire when inputs ready" (called the firing rule).
- Parallelism is automatic — any two nodes whose inputs are ready can run at the same time.
WHY do we want this?
HOW execution works — from first principles
Consider the expression
Let's derive the dataflow graph instead of being handed one.
- The final operation is . It needs two inputs: and .
- is itself a node: a that consumes tokens and .
- is a node consuming and .
So the graph is:
Firing trace (Why each step?):
- Tokens arrive. Why? Inputs are the starting data.
+node has both inputs () → fires, emits token . Simultaneously-node has → fires, emits . Why simultaneously? Both firing rules are satisfied at once and the nodes are independent → hardware runs them in parallel.×node now has → fires, emits . Why last? Its firing rule could not be satisfied earlier because its inputs didn't exist yet — the data dependency forces the order, nothing else does.

Static vs Dynamic dataflow
Worked example — a loop
Compute conceptually as a dataflow.
Body per iteration : sum_new = sum_old + i.
Why tags matter here (step-by-step):
- Iteration : token , → fires → .
- Iteration can already have its -token flowing while iteration 1 finishes. Tags keep them separate so a fast -token never wrongly pairs with a slow -token from another iteration.
- Result: pipeline parallelism across iterations with no locks — the "matching store" hardware only fires when tags agree.
Common mistakes
Recall Feynman: explain to a 12-year-old
Imagine a kitchen where each cook makes one thing but only when all their ingredients are on the table. Nobody waits for a bell or a boss shouting "next!". The moment a cook has everything they need, they cook — and lots of cooks can work at the same time. The "recipe" isn't a numbered list; it's a picture of arrows showing whose finished dish becomes whose ingredient. In the fancy version, every ingredient has a sticker saying which order it belongs to, so the salad for table 3 never gets mixed with table 7's soup.
Active recall
What replaces the program counter in a dataflow architecture?
State the firing rule of a dataflow node.
How is a dataflow program represented?
What determines execution order in dataflow?
Difference between static and dynamic dataflow?
In tagged-token dataflow, what must match before a node fires?
Why does dataflow expose parallelism "for free"?
What is a token?
What hardware unit pairs up matching tokens in dynamic dataflow?
Why do we need tags in a loop?
Connections
- Von Neumann architecture — the sequential PC-based model dataflow reacts against.
- Instruction-Level Parallelism — dataflow is the natural limit of ILP: all dependencies exposed.
- Out-of-Order Execution — modern CPUs use a local, hidden dataflow engine (Tomasulo/reservation stations = tagged-token matching!).
- Systolic Arrays — another data-driven, PC-free style for regular computations.
- Directed Acyclic Graph (DAG) — the mathematical structure of a dataflow graph.
- Loop-Level Parallelism — enabled cheaply by dynamic/tagged dataflow.
Concept Map
Hinglish (regional understanding)
Intuition Hinglish mein samjho
Dekho, normal computer (Von Neumann) mein ek program counter hota hai jo decide karta hai ki agli instruction kaunsi chalegi — bilkul ek numbered list ki tarah, ek ke baad ek. Dataflow architecture mein yeh program counter hota hi nahi. Yahan program ek graph ki tarah likha jata hai: har node ek operation (jaise +, -, ×) hai, aur edges pe tokens (yaani data values) travel karte hain. Rule simple hai: koi bhi node tabhi fire (execute) karta hai jab uske saare input tokens ready ho jayein. Matlab data hi batata hai kya chalega — isliye naam "dataflow".
Iska sabse bada fayda: parallelism free mein milta hai. Jaise (x+y) aur (x-z) dono ek dusre pe depend nahi karte, toh dono ek saath chal sakte hain — bina programmer ke bole. Sirf jab multiply ko dono results chahiye, tab woh wait karta hai. Yaani ordering sirf data dependency se aati hai, faltu sequential ordering hataa di jaati hai.
Ab loops ka issue: agar do iterations ek saath overlap kar rahe hain, toh confusion ho sakta hai — iteration-2 ka token galti se iteration-1 ke saath match kar le. Isko solve karne ke liye dynamic (tagged-token) dataflow aata hai, jisme har token pe ek tag (sticker) lagta hai jo batata hai "main kaunse iteration/context ka hoon". Node tabhi fire karta hai jab tokens ke tags match karein. Isse multiple iterations safely pipeline ho jaate hain.
Yeh matter kyun karta hai? Kyunki modern CPUs bhi andar-andar chhota sa dataflow engine chalati hain (Tomasulo, reservation stations = tagged-token matching!). Toh yeh concept sirf theory nahi — aaj ke out-of-order processors ki backbone hai. Yaad rakho: D.A.T.A — Data drives, Arrows = dependencies, Tokens carry values, All-inputs-ready = fire.