I have a System Verilog code that does checking based on a reference model. The ref model is updated by several analysis ports (in a monitor) in parallel, and also being read by my checker.
The shared ref model holds many data objects and the checker needs to "look" on multiple objects at the same cycle.
I need to somehow sync my checker to wait until all transactions from current cycle on the monitor's analysis ports will update the ref model. However, it is not guaranteed which task executes first : monitor's tasks or my checker tasks, so my checker may read stale (not updated) value from the reference model.
When I used to work with Specman, such issues could have been solved by using sys.tick_end() at the checker. This guaranteed that checker code will execute "at the end of the current cycle" - after all ports monitors already updated the reference model.
Is there any SystemVerilog equivalent for Specman's sys.tick_end() ?
Alternatively, is there any other method to sync a checker to wait until "all monitors did their updates for current cycle" ?
Thanks, Roi.