Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to assert that signal 'clk' is '1'.
VHDL
assert clk = [1] report "Clock is not high" severity error;
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using double quotes instead of single quotes for bit values.
Using 1 without quotes which is invalid for std_logic.
✗ Incorrect
The assert statement checks if the signal 'clk' equals '1' (logic high).
2fill in blank
mediumComplete the code to assert that 'data_ready' is true.
VHDL
assert [1] report "Data not ready" severity warning;
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using true without quotes for std_logic signals.
Checking for '0' instead of '1'.
✗ Incorrect
The assert checks if 'data_ready' signal equals '1' (true in std_logic).
3fill in blank
hardFix the error in the assert statement to check if 'reset' is low.
VHDL
assert reset = [1] report "Reset not low" severity error;
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 0 without quotes which is invalid.
Using '1' instead of '0' for low.
✗ Incorrect
The reset signal is low when it equals '0' in std_logic.
4fill in blank
hardFill both blanks to assert that 'enable' is high and report a custom message.
VHDL
assert [1] report [2] severity note;
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the message and condition.
Using single quotes for the message.
✗ Incorrect
The assert checks if 'enable' is '1' and reports "Enable signal high" if false.
5fill in blank
hardFill all three blanks to assert 'valid' is '1', report 'Invalid data', and set severity to error.
VHDL
assert [1] report [2] severity [3];
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using severity 'warning' instead of 'error'.
Not quoting the message string.
✗ Incorrect
The assert checks if 'valid' is '1', reports "Invalid data" if false, and sets severity to error.