Data flow Modeling
Why do data flow when we already have Behavioral?
Dataflow modeling is most useful when your logic can be written as a simple equation. It makes the code short, easy to read, and automatically concurrent. Behavioral modeling is more flexible and is needed for complex or sequential logic, but for pure combinational equations, dataflow is the fastest and cleanest way.
If you know Boolean expression you should use Data flow Modeling
Because dataflow modeling is made exactly for this situation — it lets you directly write the Boolean equation as a concurrent assignment. This makes the code shorter, clearer, and closer to the actual logic equation you derived. You don’t need to write a process or use if/case statements, and there is no risk of missing signals in a sensitivity list. The simulator and synthesizer will automatically treat it as combinational logic that updates whenever any input changes.
Why Dataflow Can’t Describe Sequential Logic?
Even though sequential circuits are made from logic gates, they also need memory. Memory behavior (like storing a value on a clock edge) cannot be described with just a Boolean equation. Dataflow modeling can only show continuous combinational relationships. For sequential circuits, we must use behavioral modeling with a process or instantiate flip-flop components structurally.
Example: 4 bit Adder:
Verilog
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
entity adder_4bit is
port (
A : in STD_LOGIC_VECTOR(3 downto 0);
B : in STD_LOGIC_VECTOR(3 downto 0);
Cin : in STD_LOGIC;
SUM : out STD_LOGIC_VECTOR(3 downto 0);
Cout : out STD_LOGIC
);
end entity;
architecture dataflow of adder_4bit is
signal temp_sum : UNSIGNED(4 downto 0); -- 5 bits
signal Cin_ext : UNSIGNED(4 downto 0); -- extended Cin
begin
-- Extend Cin manually
Cin_ext <= (4 downto 1 => '0', 0 => Cin);
-- Dataflow assignment
temp_sum <= ("0" & unsigned(A)) + ("0" & unsigned(B)) + Cin_ext;
-- Output assignments
SUM <= STD_LOGIC_VECTOR(temp_sum(3 downto 0));
Cout <= temp_sum(4);
end architecture;
Elaborated Diagram:

Synthesis:

So now the question arises that how do we use modeling in the industry?
In industry, ICs are very large and complex, so they are divided into smaller modules. Each module is written separately using behavioral modeling for both combinational and sequential parts, and pure combinational logic is often written in dataflow style because it is shorter and easier to read. After all the modules are ready, they are connected together inside a top-level module using structural modeling. This combination of different modeling styles in one design is called mixed modeling, and it is the standard way large digital systems are designed.
​
As we have already seen in ALU Example above in Detail.
​
So guys, did you enjoy this little lesson? 🙂 If yes, give it a thumbs-up, share with your buddies, and let’s keep learning together!"
