Challenge - 5 Problems
Simulation Time Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
What is the output time after this wait statement?
Consider the following VHDL process snippet:
Assuming simulation starts at time 0 ns, what is the simulation time when the message "End of process" is reported?
process
begin
wait for 10 ns;
report "Checkpoint reached";
wait for 5 ns;
report "End of process";
wait;
end process;
Assuming simulation starts at time 0 ns, what is the simulation time when the message "End of process" is reported?
VHDL
process begin wait for 10 ns; report "Checkpoint reached"; wait for 5 ns; report "End of process"; wait; end process;
Attempts:
2 left
💡 Hint
Add the wait times sequentially to find the total simulation time before the second report.
✗ Incorrect
The process waits 10 ns first, then reports, then waits another 5 ns before the second report. So total time before "End of process" is 10 ns + 5 ns = 15 ns.
❓ Predict Output
intermediate2:00remaining
What happens if you use 'wait until clk = '1'' in a process?
Given the following VHDL process:
Assuming clk is a clock signal toggling every 10 ns starting at '0' at time 0, what is the simulation time when the report is first printed?
process
begin
wait until clk = '1';
report "Rising edge detected";
end process;
Assuming clk is a clock signal toggling every 10 ns starting at '0' at time 0, what is the simulation time when the report is first printed?
VHDL
process begin wait until clk = '1'; report "Rising edge detected"; end process;
Attempts:
2 left
💡 Hint
The signal clk starts at '0' and toggles every 10 ns, so the first time it becomes '1' is at 10 ns.
✗ Incorrect
Since clk starts at '0' at time 0 and toggles every 10 ns, it becomes '1' at 10 ns. The wait until statement resumes at that time.
❓ Predict Output
advanced2:00remaining
What is the simulation time after multiple wait statements with delta delays?
Analyze this VHDL process:
What is the simulation time when "Second report" is printed?
process
begin
wait for 0 ns;
report "First report";
wait for 0 ns;
report "Second report";
wait;
end process;
What is the simulation time when "Second report" is printed?
VHDL
process begin wait for 0 ns; report "First report"; wait for 0 ns; report "Second report"; wait; end process;
Attempts:
2 left
💡 Hint
Wait for 0 ns advances simulation by delta cycles, not real time.
✗ Incorrect
Each 'wait for 0 ns' advances simulation by one delta cycle without advancing real time. So both reports occur at simulation time 0 ns but in different delta cycles.
❓ Predict Output
advanced2:00remaining
What error occurs with conflicting wait statements in a process?
Consider this VHDL process:
What happens when you simulate this process?
process
begin
wait for 10 ns;
wait until clk = '1';
wait;
end process;
What happens when you simulate this process?
VHDL
process begin wait for 10 ns; wait until clk = '1'; wait; end process;
Attempts:
2 left
💡 Hint
Multiple wait statements are allowed sequentially in a process.
✗ Incorrect
VHDL allows multiple wait statements in a process. The process waits 10 ns, then waits until clk = '1', then waits indefinitely.
🧠 Conceptual
expert2:00remaining
How does 'wait for 0 ns' affect simulation scheduling?
In VHDL simulation, what is the effect of using 'wait for 0 ns' inside a process?
Choose the most accurate description.
Choose the most accurate description.
Attempts:
2 left
💡 Hint
Think about how zero-time waits affect event scheduling in VHDL.
✗ Incorrect
'wait for 0 ns' advances the simulation by one delta cycle, allowing other processes to run, but does not advance the actual simulation time.