Local variable assignment in Multithread consequent

In reply to ben@SystemVerilog.us:

The question is:
In a multithreaded antecedent, when should the pass action block be called?

I believe the pass action block should execute if all threads in an attempt have atleast one non-vacuous pass with no thread failing.

Using the same approach I documented the threads for each attempt ( NVP is Non-vacuous pass , VP is Vacuous pass ) : All_Attempts
(1) For 1st attempt at T:5 , there are 5 threads T1 to T5 . T1 and T2 have vacuous pass as ‘rdDone’ is false at T:15 and T:25 respectively.

So 1st attempt at T:5 results in no thread failing. Last thread with NVP is at T:105.
Hence assertion pass action block should execute at T:105

(2) For 2nd attempt at T:15 , there are 5 threads T1 to T5. T1 and T5 have vacuous pass as ‘rdDone’ is false at T:25 and T:65 respectively.

So 2nd attempt at T:15 results in no thread failing. Last thread with NVP is at T:105.
Hence assertion pass action block should execute at T:105

(3) For 3rd attempt at T:25 , there are 5 threads T1 to T5. T4 and T5 have vacuous pass as ‘rdDone’ is false at T:65 and T:75 respectively.

So 3rd attempt at T:25 results in no thread failing. Last thread with NVP is at T:105.
Hence assertion pass action block should execute at T:105

(4) For 4th attempt at T:35 , there are 5 threads T1 to T5. T3 to T5 have vacuous pass as ‘rdDone’ is false

So 4th attempt at T:35 results in no thread failing. Last thread with NVP is at T:105.
Hence assertion pass action block should execute at T:105

(5) For 5th attempt at T:45 , there are 5 threads T1 to T5. T2 to T5 have vacuous pass as ‘rdDone’ is false

So 5th attempt at T:45 results in no thread failing. Last thread with NVP is at T:105.
Hence assertion pass action block should execute at T:105

(6) Other attempts have all vacuous pass as ‘rdDone’ is sampled false for each thread.

Therefore the pass action block should execute 5 times

I added a “go” to restrict the model to one successful attempt

I later tried using: first_match

I observe different output across tools.
Using first_match, assertion should pass as soon as the 1st thread of an attempt is successful.

So using:All_Attempts, ideally shouldn’t the output be :
T: 85 Assertion PASS
T: 85 Assertion PASS
T: 85 Assertion PASS
T: 105 Assertion PASS
T: 105 Assertion PASS

Please correct me if wrong.

Thanks