How time advances in uvm scoreboard

In reply to harsh pandya:

Thank you for explaining this concept. I am trying to write a scoreboard for a design which gets transactions of 2 types in out of order (but not interleaved - different types of packets cannot mix. Example: A3A0A2A1 B0B2B1B3) on the input side, while transactions goes out in order on the output side (AOA1A2A3 B0B1B2B3). so design does reordering of transactions and sends all transactions of type A followed by all transactions of type B. Below is my approach to solve this,

//On input side (write method from input monitor):

  1. Push all transactions of type A into a temp queue, until type B starts showing up. (Planning to use cast for this check)
  2. Sort this queue inorder based on id (or however design does it) and push content of entire queue to another queue (before_queue) or uvm_tlm_fifo.
  3. Start storing type B packet into temp queue

On output side:

  1. Transactions are stored in uvm_tlm_analysis_fifo (after_fifo)
  2. Compare after_fifo and before_fifo/before_queue with a wait like you mentioned in the run phase of scoreboard with forever begin end

Does this approach have any issues or is there a better way to approach this problem?

Thanks