Complete the code to wait for 10 ns before changing the signal.
process
begin
signal_a <= '1';
wait for [1];
signal_a <= '0';
wait;
end process;The wait for statement pauses the process for the specified time. Here, 10 ns is the correct time unit for typical VHDL simulation delays.
Complete the code to wait until the rising edge of the clock signal.
process
begin
wait until [1] = '1' and [1]'event;
signal_b <= not signal_b;
end process;wait for instead of wait until for edge detection.The wait until statement waits for a condition. To wait for the rising edge of the clock, we check when clock = '1' and clock'event is true.
Fix the error in the wait statement to correctly wait for 20 ns.
process
begin
signal_c <= '1';
wait for [1];
signal_c <= '0';
wait;
end process;The wait for statement requires a number followed by a space and a time unit without quotes. So wait for 20 ns; is correct.
Fill both blanks to create a process that waits for 5 ns, sets signal_d to '1', then waits for 10 ns.
process
begin
wait for [1];
signal_d <= '1';
wait for [2];
signal_d <= '0';
wait;
end process;The process first waits 5 ns, sets the signal, then waits 10 ns before resetting it. So the blanks are filled with 5 ns and 10 ns.
Fill all three blanks to create a process that waits for a rising edge of clk, sets signal_e to '1', then waits for 15 ns.
process
begin
wait until [1] = '1' and [2]'event;
signal_e <= '1';
wait for [3];
signal_e <= '0';
wait;
end process;The process waits for the rising edge of clk (so both blanks are clk), then waits for 15 ns before resetting the signal.