I have a requirement which says signal B should go high within 1ms of signal A going high. Now I can easily write this in interface in initial block as below:
initial
begin
forever
begin
@(posedge A)
assert(B==0)
#1ms
assert(B==1)
end
end
I am thinking of writing property based on assertion but not able to come up with something which is fullproof
For Example:
property A2B(A,B,Max);
realtime a_time;
realtime b_time;
@(posedge A)
(1,a_time=$realtime)|-> @(posedge B) (1,b_time=$realtime) |-> (1,(b_time-a_time) < Max);
endproperty
The problem here is if B never raises then simulator would mark it as vacuous Pass. Can someone suggest something to improve here?