property write;
int a;
int b;
int c;
@(posedge clk) ((cmd == 'hA && id == 'hB && req && ready), a = 'hB+42, b = 'hA+43, c= 'hC+44) ## [2:50] first_match(out[15:0] == 'h8 && out[31:16] == 'h9) |=> (next_out[15:0] == 'h10 && next_out[31:16] == 'h21);
endproperty
I see that if (cmd == 'hA && id == 'hB && req && ready) is matched two times in the 50 clock cycles, a,b and c are not getting updated with latest values to compare.
what im looking for is
at every clock cycle
watch for (cond1) then capture some data in local variables a,b
then wait for 2 to 50 clock cycles
check for another set of signals and compare with a
then wait for one more cycle
check for another set of signals and compare with b
it is something like this
module dummy (input cond1, cond2, cond3);
property write;
int a,b;
@(posedge clk) first_match (($rose cond1), a=addr, b=data) ## [2:50] (cond2 == a) |=> cond3 == b;
end property
property write;
int a,b;
@(posedge clk) first_match (($rose(cond1), a=addr, b=data) ## [2:50] cond2 == a)
|=> cond3 == b;
end property
cond1 may appear twice before cond2 can happen.
At each clocking event there is an attempt, and if that attempt is successful the local Variables are updated, and they are local to that thread ONLY. If $rose(cond1)appears again in another cycle then a new thread is started, independently from the other thread.
During a successful attempt, Local variables are updated for that attempt in the sequence matched item. Again, those local variables are local to that thread for that attempt, and not for any other attempt.Read my paper https://verificationacademy.com/news/verification-horizons-march-2018-issue and understand the equivalency (but not implementation) of an SVA assertion using automatic tasks with automatic local variables that are started with fork-join.