In assertions there is $past function for this purpose.
What about outside assertions?
- can I use $past ?
- if not, how easily to get the same?
Update to question 1:
tried to use in agent monitor (UVM).
@(vif.rx[i]);
past_rx = $past(vif.rx[i], @(vif.rx[i])); // to get rx[i] value just
// before event @(vif.rx[i]);
Got compilation error messages:
** Error: /local/yuri/fulvous/tb_src/…//tb_src/hf_agent/hf_mon.svh(71): Automatic variables are not supported in clock expressions.
** Error: /local/yuri/fulvous/tb_src/…//tb_src/hf_agent/hf_mon.svh(71): automatic variables can not be used in ‘$past’.