ScoreBoard for a DMA Controller DUT

Hello,
I have a question on ScoreBoard for a Verifying a DMA Controller.

I have a DMA Controller and 2 Memories ( MEM1 and MEM 2 ) together as a DUT.
I have build a UVM Testbench for the DUT. There is src address Register
and dst address Register in the DMA Controller. UVM AHB Agent writes the
src address and dst address and fill up the MEM1 and trigger a DMA operation
to copy MEM1 contents to MEM2.

How do I build a ScoreBoard to verify if the DMA operation was correct. 

What kind of datastructure is suitable. Associative Array ?

Suppose I build two Associative array to Store the MEM1 contents as  A_Mem1[*]  

and the Result as A_Mem1[*] where should I put the compare logic. Should it be in the
run_phase of the ScoreBoard or in the run_phase of the test ?

Please help

Thanks
JeffD

In reply to dvuvmsv:
you should create the monitor and once the dma for mem2 will get done. Just performa the backdoor read for mem1 (dynamic array) and mem2 dynamic array. Just compare in your monitor run_phase.

Thanks for your reply.
How does the Monitor know that DMA is done.
There is a register bit in DMA Status bit Register assert 1 when DMA is done.
In your method, I can wait for DMA done and then have a compare task in Monitor run_phase.

Is this a UVM way to do comparison in Monitor run_phase ?

Suppoose I want to do the Comparison in ScoreBoard run_phase, How should the
uvm_test know whether the comparison is done or not. uvm_test has a raise_objection and
drop_objection. Do I need to raise_objection in ScoreBoard before comparison and drop_objection after compare, so that the uvm_test know there is ScoreBoard pending and it waits for that to finish before exiting the test?

Thanks
JeffD

In reply to dvuvmsv:
Technically uvm_monitor converts the interface activity in a transaction, and I made an assumption that dma_done signal is visible inside the monitor. still you will have to know about dma done at mem2. dma_done will be internal signal so it wont update the register automatically so you can not poll the mirror value in scoreboard. Transaction level scoreboard should not consume any cycle.

  1. you will have to monitor the internal signal and once you see the event .
    then you should update the predict method of register
    @dma_done event
    <reg_handle>.predict(value)

implement the callback method for the register, and registered DMA register
call back method should have event too.
Once it will execute the post_predict method then generate the event from post_predict.

you can use this event in your scoreboard as blocking elements.

once you get the event performa the backdoor read on mem1 and mem2

Thanks for your reply. I marked your reply as Solution.
Thanks for answering my questions.
JeffD