What is a common pitfall when using inferred latches in VHDL?
Inferred latches occur when a signal is not assigned in all branches of a conditional statement, causing unintended memory elements. Always assign signals in every branch to avoid this.
Click to reveal answer
beginner
Why should you avoid using 'wait' statements in synthesizable VHDL code?
'wait' statements are generally not supported by synthesis tools and can cause simulation-synthesis mismatches. Use clocked processes with sensitivity lists instead.
Click to reveal answer
intermediate
How can you prevent combinational loops in your VHDL design?
Combinational loops happen when outputs feed back to inputs without registers. To avoid this, insert registers or redesign logic to break feedback paths.
Click to reveal answer
intermediate
What is the risk of using variables instead of signals inside clocked processes in VHDL synthesis?
Variables update immediately within a process, which can cause unexpected behavior if misunderstood. Signals update after the process ends, matching hardware behavior better.
Click to reveal answer
beginner
Why should you avoid using 'std_logic_vector' for arithmetic operations without proper conversion?
'std_logic_vector' is just a bit array and does not support arithmetic directly. Use numeric types like 'signed' or 'unsigned' with proper libraries to ensure correct synthesis.
Click to reveal answer
What causes an inferred latch in VHDL?
AUsing signals instead of variables
BNot assigning a signal in all branches of a conditional
CUsing 'wait' statements
DUsing only clocked processes
✗ Incorrect
If a signal is not assigned in every branch, synthesis infers a latch to hold the previous value.
Which statement is NOT recommended for synthesizable VHDL?
AUsing 'signed' or 'unsigned' types for arithmetic
BUsing clocked processes with sensitivity lists
CAssigning signals in all conditional branches
DUsing 'wait' statements
✗ Incorrect
'wait' statements are generally unsupported in synthesis and can cause issues.
How do variables behave inside a clocked process compared to signals?
AVariables update immediately, signals update after process ends
BVariables update after process ends, signals update immediately
CBoth update immediately
DBoth update after process ends
✗ Incorrect
Variables update instantly within the process, signals update at the end, reflecting hardware timing.
What is a good practice to avoid combinational loops?