Thanks Ben for assistance. If I understand correctly, requirement is break down into three checks.
Report error if signal “a” comes within 1us of state change. Taken care in first process of fork-join in task t_ahi().
Pass info if signal “a” comes after 1us of state change.Taken care in second process of fork-join in task t_ahi().
Check for signal to go high for one clock cycle anytime after 1us - Taken care in assertion “ap_fsm2” but I failed to understand this assertion, why 200 clk cycles is required here i.e 2us(2000ns) local generation of clock cannot be used as there is already some assertion clock of some particular frequency being used for FSM change, this may change for different tests. How this assertion can be made generic without dependency on local clock ?
On the task, you need to add the 1 clk check. Thus,
begin : check
# 1us;
wait(a);
-> e2;
@(posedge clk);
if(! a) `uvm_info (tID,$sformatf("%m : ap_fsm_PASS, a= %b", a), UVM_LOW)
else.... // error message
end : check
[/systemverilog ]
The ap_fsm2 should work and there is no need for the task approach. I was just demonstrating different solutions. Read my paper.
In reply to dave_59:
Yes, it was a mistake on my part, Dave s correct. Watch out for those counts :)
ap_fsm2: assert property(@ (posedge clk)
$changed(fsm) |-> (!a [*100]) and // "a" to remain low for 2us
##100 a[->1] ##1 !a ); // also, after 2us "a" should occur,
// that is followed by "a" 1 clk later.