Fork within loop with join ALL

In reply to dave_59:

Hello Dave,
I am trying to run below code :


        my_seq = new[2];
        fork 
            begin : isolating_thread
              for(int index=0;index<2;index++) begin : for_loop
                  automatic int idx=index;
                  automatic int local_qd=$urandom_range(1,4);
                  fork
                      `uvm_do_with(my_seq[idx],
                                    {
                                     qd           == local_qd;
                                    })
                  join_none;
              end : for_loop
            wait fork;
            end : isolating_thread
        join

I am getting below Error :

=======================================================
Solver failed when solving following set of constraints
integer qd = 0;
integer local_qd = 4;
constraint WITH_CONSTRAINT // (from this) (constraint_mode = ON) (<File_path>:233)
{
(qd == local_qd);
}
=======================================================

Can you please help me with this ?? Thanks a lot in advance.

  • Biren