In reply to gs:
I had the same issue when analyzing this section of the Cookbook. The out of order comparator relies on the fact the the transactions received on the two analysis ports are tagged with the correct ID. Let’s say that the driver sends transactions with the in-order IDs of 1,2,3 and the DUT processes with different priorities and outputs them in 2,1,3 order.
On the driver transaction flow side, the IDs probably just a static integer for the transaction class that gets incremented each time a new transaction object is created. What I cannot figure out is how does the monitor know to assign the correct ID when it constructs its transaction object upon receiving a response from the DUT. I mean, the monitor receives the first output response and then it must decide what ID to assign to it: 1,2 or 3. How does it know that it should assign ID 2 to this first received response (considering the above example)?