I am doing explicit prediction and predictor is connected to interface UVC monitor.
But when i do reg.write() and immediately in the next line if i use get_mirrored_value() i dont see the value getting returned but i see that value is updated later and when i do a read with check it matches.
Also, when i add some delay after write and do get_mirrored_value() i see the value which i intend to write. I want to know why this delay in updating mirrored value and how this delay can be compensated?
I read in some of the blogs this delay is expected while dong explicit prediction, is it true so ?
I think its based on the time a transaction is coming back from the driver vs monitor. Predictor is based on the monitor, if the monitor modeling is to send the transaction at later time, then you will have delay in prediction.
There are several ways to avoid your problem. When using the monitor for prediction you have to adopt your timing. You could use an event to indicate the monitor has processed the transaction and is ready for further calculations. Or you could use an explicit predictor.