What is the difference between `always_comb` and `always_ff` in SystemVerilog?

1 Answers
Answered by suresh

What is the difference between `always_comb` and `always_ff` in SystemVerilog?

In SystemVerilog, the focus keyword difference between `always_comb` and `always_ff` lies in their functionality and usage. While both are procedural blocks, they serve different purposes in writing RTL code.

always_comb: The always_comb block is used to infer combinational logic without any clock constraint. It is executed whenever any of its input signals change.

always_ff: On the other hand, the always_ff block is specifically used to describe clocked processes. It is executed on every rising edge of the clock signal specified in the sensitivity list.

Therefore, the key distinction is that always_comb is for combinational logic, while always_ff is for describing sequential logic controlled by a clock signal.

Answer for Question: What is the difference between `always_comb` and `always_ff` in SystemVerilog?