type t_command is (stop, run, hold, priority_grant); signal s_command : t_command := stop; user_cmd_req_gnt_p: process variable v_tb_cnt : integer := 0; begin signal_force("/top_tb/tb_control_array(" & to_str(v_tb_cnt) & ").command", "hold", 0 ns, freeze, open); while (true) loop init_signal_spy("/top_tb/tb_control_array(" & to_str(v_tb_cnt) & ").command", "s_command", 1); wait for 1 ps; if (s_command = stop) then exit; else v_tb_cnt := v_tb_cnt +1; signal_force("/top_tb/tb_control_array(" & to_str(v_tb_cnt) & ").command", "hold", 0 ns, freeze, open); s_command <= stop; end if; -- wait for 1 ps; end loop; wait for 1 ps; for i in 0 to v_tb_cnt-1 loop signal_force("/top_tb/tb_control_array(" & to_str(i) & ").command", "stop", 0 ns, freeze, open); -- force test level sdias end loop; ... end process user_cmd_req_gnt_p;