I have created 2 analysis_imports in the scoreboard to receive Type_A and Type_B transactions.
There is only one particular field say(bit [31:0] w_data) which is common between the 2 types of transaction.
1st Method: Got a different PacketA.
In the write function of Type_A ...I collected the PacketA say with address 16'h1000 in a queue of Type_A.
Then tried to pop it and compare in the Write function of Type_B. But I got a different packet from the queue (executed at the current time), not the one with the address 16'h1000.
2nd Method: Works
In Type_A write function I collect the PacketA and store the w_data of Type_A in a temp variable.
I use this temp in the Type_B write function to compare with the Received Packetb.w_data.
Is there a better way of comparing?