Always Block Sensitivity List
📖 Scenario: You are designing a simple digital circuit in Verilog that reacts to changes in input signals. To do this correctly, you need to understand how to write an always block with the proper sensitivity list so your circuit updates at the right times.
🎯 Goal: Build a Verilog module with an always block that triggers whenever either input a or input b changes, and outputs their sum on sum.
📋 What You'll Learn
Create a module named
adder with inputs a and b and output sumUse an
always block with a sensitivity list that includes a and bInside the
always block, assign sum the value of a + bUse non-blocking assignment
<= inside the always block💡 Why This Matters
🌍 Real World
Digital circuits often need to update outputs when inputs change. Using the correct sensitivity list in an always block ensures the circuit behaves as expected.
💼 Career
Understanding always blocks and sensitivity lists is essential for hardware design engineers working with Verilog or other hardware description languages.
Progress0 / 4 steps