Mirroring in Register Abstraction Layer

In reply to naveen-y:

If you connected bus monitor to predictor then you don’t need to set_auto_predict(1).
Basically,

  • Write operation will update desired/mirrored value as follow:
  1. Update desired mirror with written value using set(value) function
  2. Perform write operation
  3. Update both desired and mirrored value using do_predict function (if auto_predict is enable, and write operation is successfull)
  4. Write transaction on the monitor bus will be captured to predictor (in your case), then desired and mirrored value will be updated one more time using do_predict function in predictor.
  • Read operation will update desired/mirrored value as follow:
  1. Perform read operation
  2. Read transaction on the monitor bus will be captured to predictor, then desired and mirrored value will be updated using do_predict function in predictor.
  3. Update both desired and mirrored value using do_predict function (if auto_predict is enable, and read operation is successful)

Please follow the flow above to apply your case. From my experience, maybe you get mirrored/desired value too fast then you see the mismatched. To avoid a conflict when updating desired/mirrored value in predictor and in get/set function, you should add some waited times after write/read function to make sure the operation in predictor is successful first before you can get these values.