Recall & Review
beginner
What is a blocking assignment in Verilog?
A blocking assignment uses the '=' operator and executes statements sequentially, blocking the next statement until the current one finishes.
Click to reveal answer
beginner
When should you use blocking assignments in Verilog?
Use blocking assignments for combinational logic where statements must execute in order and immediately update values within the same always block.
Click to reveal answer
intermediate
Why are blocking assignments preferred for combinational logic?
Because they simulate the immediate effect of logic gates, ensuring outputs update as inputs change within the same simulation cycle.
Click to reveal answer
intermediate
What can go wrong if you use non-blocking assignments in combinational logic?
Non-blocking assignments delay updates until the end of the time step, which can cause incorrect or unintended behavior in combinational circuits.
Click to reveal answer
intermediate
Give an example scenario where blocking assignments are necessary.
When calculating intermediate signals step-by-step in combinational logic, blocking assignments ensure each step uses the updated value immediately.
Click to reveal answer
Which assignment type should you use for combinational logic in Verilog?
✗ Incorrect
Blocking assignments execute sequentially and update values immediately, which matches combinational logic behavior.
What happens if you use non-blocking assignments in combinational always blocks?
✗ Incorrect
Non-blocking assignments delay updates until the end of the time step, which can cause incorrect combinational logic behavior.
In which type of always block is blocking assignment preferred?
✗ Incorrect
Blocking assignments are preferred in combinational always blocks to model immediate logic updates.
What operator is used for blocking assignments in Verilog?
✗ Incorrect
The '=' operator is used for blocking assignments.
Why is order of statements important in blocking assignments?
✗ Incorrect
Blocking assignments execute one after another, so order affects the final result.
Explain why blocking assignments are used for combinational logic in Verilog.
Think about how combinational logic updates outputs instantly when inputs change.
You got /4 concepts.
Describe the difference between blocking and non-blocking assignments and when to use each.
Consider how hardware behaves in combinational vs sequential circuits.
You got /4 concepts.