0
0
VHDLprogramming~20 mins

Report statement for debug output in VHDL - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
VHDL Debugging Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
What is the output of this VHDL report statement?
Consider the following VHDL process snippet. What will be printed on the simulator console when this process runs?
VHDL
process
begin
  report "Simulation started" severity note;
  wait;
end process;
ASimulation started
BNo output
CError: Simulation started
D
Simulation started
Severity: NOTE
Attempts:
2 left
💡 Hint
The report statement prints the message and the severity level in the simulator output.
Predict Output
intermediate
2:00remaining
What severity level is shown by this report statement?
Given this VHDL code snippet, what severity level will appear in the simulation output?
VHDL
process
begin
  report "Warning: Check signal" severity warning;
  wait;
end process;
ANOTE
BERROR
CWARNING
DFAILURE
Attempts:
2 left
💡 Hint
The severity keyword defines the level shown in the output.
Predict Output
advanced
2:00remaining
What happens if you omit the severity in a report statement?
Examine this VHDL code. What is the default severity level if it is not specified?
VHDL
process
begin
  report "Default severity message";
  wait;
end process;
ASeverity is ERROR by default
BSeverity is NOTE by default
CSeverity is WARNING by default
DNo severity is shown
Attempts:
2 left
💡 Hint
Check the VHDL standard default severity for report statements.
Predict Output
advanced
2:00remaining
What error occurs with this incorrect report statement?
What error will this VHDL code produce when compiled?
VHDL
process
begin
  report 123 severity warning;
  wait;
end process;
AType error: report message must be a string
BSyntax error: missing semicolon
CNo error, runs fine
DRuntime error: invalid severity
Attempts:
2 left
💡 Hint
The report message must be a string literal or string expression.
🧠 Conceptual
expert
3:00remaining
How to use report statements for conditional debug output?
Which VHDL code snippet correctly uses a report statement to print a debug message only when signal 'error_flag' is true?
Aif error_flag = '1' then report "Error detected" severity error; end if;
Breport "Error detected" severity error when error_flag = '1';
Creport "Error detected" severity error if error_flag = '1';
Dwhen error_flag = '1' report "Error detected" severity error;
Attempts:
2 left
💡 Hint
Use an if statement to conditionally execute the report.