0
0
VHDLprogramming~20 mins

Stimulus process with wait statements in VHDL - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Stimulus Process Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
Output of a stimulus process with sequential wait statements

Consider the following VHDL stimulus process. What will be the value of signal_a after 30 ns?

VHDL
process
begin
  signal_a <= '0';
  wait for 10 ns;
  signal_a <= '1';
  wait for 10 ns;
  signal_a <= '0';
  wait for 10 ns;
  wait;
end process;
ASignal retains previous value before process
B'1'
CUndefined (signal_a is not assigned)
D'0'
Attempts:
2 left
💡 Hint

Think about how the signal changes at each wait statement and the total elapsed time.

Predict Output
intermediate
2:00remaining
Value of signal after multiple wait statements with different durations

Given this VHDL stimulus process, what is the value of signal_b at 25 ns?

VHDL
process
begin
  signal_b <= '1';
  wait for 5 ns;
  signal_b <= '0';
  wait for 15 ns;
  signal_b <= '1';
  wait for 10 ns;
  wait;
end process;
A'1'
B'0'
C'U' (undefined)
DSignal retains initial value
Attempts:
2 left
💡 Hint

Calculate the time intervals and see which assignment is active at 25 ns.

Predict Output
advanced
2:00remaining
Output of a stimulus process with wait until and wait for combined

What will be the value of signal_c at 50 ns given this process?

VHDL
process
begin
  signal_c <= '0';
  wait until now = 20 ns;
  signal_c <= '1';
  wait for 20 ns;
  signal_c <= '0';
  wait;
end process;
A'0'
B'1'
CProcess will hang and signal_c remains '0'
DSignal_c is 'U' (undefined)
Attempts:
2 left
💡 Hint

Consider how wait until and wait for affect the timing of assignments.

Predict Output
advanced
2:00remaining
Effect of multiple wait statements on process execution

What is the final value of signal_d after this process completes?

VHDL
process
begin
  signal_d <= '1';
  wait for 10 ns;
  signal_d <= '0';
  wait for 10 ns;
  signal_d <= '1';
  wait for 10 ns;
  signal_d <= '0';
  wait;
end process;
AProcess never completes, signal_d remains '1'
B'1'
C'0'
DSignal_d is 'U' (undefined)
Attempts:
2 left
💡 Hint

Follow the signal assignments and wait times step by step.

🧠 Conceptual
expert
2:00remaining
Understanding process suspension with wait statements

In a VHDL stimulus process with multiple wait statements, what happens to the process execution after the last wait; statement?

AThe process restarts from the beginning immediately
BThe process suspends indefinitely and does not resume unless triggered externally
CThe process terminates and cannot be resumed
DThe process continues executing the next statements sequentially
Attempts:
2 left
💡 Hint

Think about how wait; without conditions affects process behavior.