Recall & Review
beginner
What is a non-blocking assignment in Verilog?
A non-blocking assignment uses the '<=' operator and schedules the assignment to happen at the end of the current time step, allowing all right-hand side expressions to be evaluated before updating the left-hand side.
Click to reveal answer
beginner
Why should non-blocking assignments be used in sequential logic?
Non-blocking assignments prevent race conditions by updating all registers simultaneously at the end of the clock cycle, which models real hardware flip-flop behavior.
Click to reveal answer
intermediate
When should blocking assignments be avoided in sequential always blocks?
Blocking assignments should be avoided in sequential always blocks because they update variables immediately, which can cause unintended ordering and simulation mismatches with hardware.
Click to reveal answer
intermediate
How does non-blocking assignment help in modeling flip-flops?
Non-blocking assignments update all outputs simultaneously after evaluating inputs, mimicking how flip-flops capture data on clock edges in real hardware.
Click to reveal answer
advanced
What is a common mistake when mixing blocking and non-blocking assignments in sequential logic?
Mixing blocking and non-blocking assignments in the same always block can cause simulation mismatches and unpredictable behavior because of different update timings.
Click to reveal answer
Which operator is used for non-blocking assignments in Verilog?
✗ Incorrect
The '<=' operator is used for non-blocking assignments, which schedule updates at the end of the time step.
Why use non-blocking assignments in sequential always blocks?
✗ Incorrect
Non-blocking assignments update all registers simultaneously, matching hardware flip-flop behavior.
What happens if blocking assignments are used in sequential logic?
✗ Incorrect
Blocking assignments update immediately, which can cause race conditions in sequential logic.
Which type of assignment models flip-flop behavior best?
✗ Incorrect
Non-blocking assignments model flip-flops by updating outputs simultaneously after evaluation.
What is a risk of mixing blocking and non-blocking assignments in the same always block?
✗ Incorrect
Mixing assignment types can cause unpredictable simulation results due to different update timings.
Explain why non-blocking assignments are preferred in sequential logic blocks in Verilog.
Think about how hardware flip-flops update on clock edges.
You got /4 concepts.
Describe the problems that can arise if blocking assignments are used in sequential always blocks.
Consider timing differences between blocking and non-blocking assignments.
You got /4 concepts.