Uvm_config_db and dynamic array issue

Hey! I’m faced with problem i have class master_memory


class master_memory extends uvm_object;

    reg[7:0] memory_0[];
    reg[31:0] memory32_0[];

      `uvm_object_utils_begin(master_memory)


  function new(string name = "master_memory",uvm_component parent = null);
    super.new(name); 
    memory_0 = new[20000];
    memory32_0 = new[5000];
  endfunction : new
endclass

I collect mem in monitor and trying to transfer it to scoreboard in extract_phase.

 
 virtual function void extract_phase(uvm_phase phase);
    super.extract_phase(phase);
      transfer_mem_to32bit();
      check_mem();
      uvm_config_db#(master_memory)::set(null, "*", "mm", mm);
  endfunction

In scoreboard I’m get this reference but all my array in master_memory class now uninit(read XX)
Where i lose array data?

  
virtual function void check_phase(uvm_phase phase);
    super.check_phase(phase);
      void'(uvm_config_db#(master_memory)::get(null, "*", "mm", mm));
      check_mem();
  endfunction

Thx for help!

In reply to favalligi:

Is it a problem with the array or any other simple class member variable? create one if it does not exist to test.

In reply to favalligi:

Make sure you are getting master_memory class object in scoreboard with assert/if condition. Currently you’re assigning output of get() method to void! May be you are using totally different object in SB.

In reply to mayurkubavat:

You should always use an if condition to check the status of a method call. Never use an assert statement as it can be disabled resulting in undesired behavior. Refer to this page for more information.

In reply to cgales:

In reply to mayurkubavat:
You should always use an if condition to check the status of a method call. Never use an assert statement as it can be disabled resulting in undesired behavior. Refer to this page for more information.

Thanks but it wasn’t problem in this situation. Monitor was used by 2 agents but memory collected only in 1. When extract phase was invoked in 2nd agent its replace all data to uninit array.