Data comparison using queues

In reply to dave_59:

Thank you Dave and Ben .

Using associative was and still is my preference. But, the problem arises when the next set of address arrives with the same id as the previous one (if I were to use address as the key instead of id, there are scenarios where there can be two consecutive addresses of the same value.) I need to group the address/data on both the inputs and outputs of the DUT (the DUT will re-order the address/id that is being input to it) and compare them when the last beat of data is received on either ends(for reads and writes). Is there a way the grouping can be done using associative arrays? Please let me know