0
0
Verilogprogramming~3 mins

Why Always block sensitivity list in Verilog? - Purpose & Use Cases

Choose your learning style9 modes available
The Big Idea

What if your circuit silently ignores input changes because you forgot one signal in the sensitivity list?

The Scenario

Imagine you are designing a digital circuit and want to update outputs whenever inputs change. You write code that checks inputs manually inside a block, but you forget to specify which signals should trigger the update.

The Problem

Without a proper sensitivity list, your circuit simulation might not update outputs correctly or on time. This causes confusing bugs because changes in inputs do not always cause the expected reactions, making debugging slow and frustrating.

The Solution

The always block sensitivity list tells the simulator exactly which signals to watch. When any of these signals change, the block runs automatically, ensuring your circuit updates correctly and efficiently.

Before vs After
Before
always begin
  if (input_signal == 1) output_signal = 1;
end
After
always @(input_signal) begin
  if (input_signal == 1) output_signal = 1;
end
What It Enables

It enables your hardware design to react instantly and correctly to signal changes, making your simulation and synthesis reliable and predictable.

Real Life Example

When designing a traffic light controller, the always block sensitivity list ensures the lights change immediately when sensors detect cars, preventing accidents and traffic jams.

Key Takeaways

Always block sensitivity list specifies which signals trigger the block.

It prevents missed updates and simulation bugs.

It makes hardware behavior clear and reliable.