UVM scoreboard input from monitor is whole transaction

Hi,

While implementing the scoreboard, we take input from the VIP monitor as a whole transaction.
So when we do a read operation, the monitor provides raddr,rdata, etc. with the transaction.

I have made a queue of write transactions first and then compared the read with this queue.

But now I need to give priority to raddr than waddr of same address. For example,

1)Memory Write happened on x address.
2)raddr for x address came.
3)waddr,wdata,bresp happened for this x address. So the x address overwritten in the queue.
4)rdata of x address came.

But this rdata shows overwritten value.
I need that rdata to show the previous value in the memory write transaction as per protocol.

How to do it on the scoreboard?

When raddr comes and write is pending on the same address, I have to put this write transaction in a separate queue until raddr,rdata phases complete.

But as the raddr comes to the scoreboard as a whole transaction with data, I cannot separate raddr and do the above-mentioned procedure.

Regards
Sheetal

In reply to sheetal saini:

Using a scoreboard in your case, testing memories is not the best approach. And dealing with a queue or an dynamic array is not useful becaus they allow only storing data in a contiguous way, i.e. you cannot use the address as the index of the array. In this case it is very useful to employ an associative array. This allows to store the data in any place of the array and not in contiguous order. You can implement this array in your sequence. It serves as the refernce model. When reading data from your DUT memory you are passing back this as a response to the sequence and you can compare the read value from the DUT with the value in your associative array. Very simple and works fine.