In reply to lanfranco.salinari:
Hello Ben,
I, too, thought about a procedural solution in alternative to the SVA one.
I don’t like very much the fact that I have to replicate the code for each signal (a macro can help here) but it may be manageable.
By the way, I don’t think that loc_sig is necessary: if end_ev occurs first, sig has not changed, in the other case, sig has certainly toggled.
Besides this a “disable fork” at the end is necessary, in my opinion, to avoid giving errors every time sig changes.
stable_ev and not_stable_ev are simply events to pass information to the testbench.
always begin
@(start_ev);
fork
begin
@(end_ev);
-> stable_ev;
end
begin
@(sig);
-> not_stable_ev;
end
join_any
disable fork
end
What do you think about this variation?
Thanks and regards,
Lanfranco