Hi All,
I was trying to understand the working of first_match and when does an assertion pass or fail using it .
Here is an example I was trying: edalink
For the first 3 attempts at T:5,15 and 25: first_match( ##[1:5]rdDone) is true at T:35 ( via ##3 rdDone/##2 rdDone/##1 rdDone respectively )
Then after 5 clocks at T:85 , expression (wData == (local_data + 'hFF)) is True. Hence the antecedent has 3 non-vacuous passes at T:85.
As consequent is false , the assertion fails thrice at T:85.
For the 1st attempt at T:5, out of its 5 threads( t1 to t5 ), ##[1:5]rdDone is true for t3,t4 and t5.
For all of t3,t4 and t5: ##5(wData == (local_data + 'hFF)) is true at T:85,95 and 105 resp.
However, the consequent is true only for t5. Yet there is no pass at T:105
Does this mean that using first_match, the consequent is checked only for the 1st non-vacuously true thread ?
i.e Even if another thread has a matching consequent , it goes unnoticed ( eg: t5 for 1st attempt at T:5 )
For the 5th attempt at T:45, the antecedent has 1st non-vacuous pass at T:105.
As the consequent is true at T:105 for the 1st thread, the assertion passes.
So to summarize the working of first_match, can I state the following:
The assertion pass/failure is based Only on the 1st non-vacuously true antecedent.
If the consequent has a match then the assertion passes (eg: attempt at T:45) else it fails (eg: attempts at T:5,15,25,35 )