Electronic – VHDL how to make a process with sensitivity list wait

vhdl

I'd like a process to listen to changes in a signal, but not before 20 ns. How can I achieve that?
It doesn't seem possible to use wait statements in such a process, which makes sense since is has a sensitivity list.
What I'm really trying to achieve is a test bench that changes one signal indefinitely and another for like 5 ns after signal ready = '1'. But I don't know precisely when that will happen. I only know that before 20 ns the system is still resetting and hence I should not listen to changes in ready before 20 ns because then I'd get errors.
Alternatives to the approach in the question are welcome.

Best Answer

For much testbench code, we do not use looping processes and process sensitivity lists to search for things. Instead, we use wait to find events.

TestProc : process 
begin
  Out1 <= '1' ; -- Steady 1 after this point.

  -- Find Reset as it deactivates
  -- a better alternative than waiting for an ad-hoc amount of time
  if Reset /= ACTIVE then
    wait until Reset = ACTIVE ; 
  end if; 
  wait until Reset /= ACTIVE ; 

  -- find ready at a level 1
  if ready /= '1' then 
    wait until ready = '1' ; 
  end if ; 
  Out2 <= '1' after 5 ns ; 

  -- find a rising edge of Clock
  -- Assumes that clock always transitions from 0 to 1 
  wait until Clk = '1' ; 
  Out2 <= '0' after 5 ns ; 
  ...

  -- Also find a rising edge of Clock
  -- rising_edge is extra work for the simulator and probably not necessary here
  wait until rising_edge(Clk) ; 
  Out2 <= '1' after 5 ns ; 
  ...

  std.env.stop ; -- stop the testbench
end process TestProc ; 

If you are looking for a behavioral model that drives Out1 to a static value, but inverts Out2 5 ns after each time Ready rises to a 1, then you can do the following:

signal Out2 : std_logic := '0' ; 
. . . 
FollowReady : process  
begin 
  -- initialization 
  Out1 <= '1' ; 
  wait for 20 ns ; 

  -- looping process like behavior
  loop 
    -- Ready is a design signal.  Only detect a 0 to 1 change
    wait until rising_edge(Ready) ;
    Out2 <= not Out2 after 5 ns ; 
  end loop ; 
end process ;