Getting Configuration Object in another module which is binded to top module

I have to set the configuration object from the lower component such as driver to assertions module, as I have many assertion checks based on the fields in the configuration object.

From Driver, I have set the config_db like this:

class my_driver extends uvm_driver #(my_transaction);
  ...
  config cfg;
  ...
  task run_phase(uvm_phase phase);
    ...
    uvm_config_db #(config) :: set ( uvm_root::get(), "uvm_test_top", "cfg", cfg );
    ...
  endtask : run_phase
endclass : my_driver

From Assertion Module I get the config_db like this:

module assertions( interface_m );
...
config cfg;
...
initial
begin
  uvm_config_db #(config) :: wait_modified( uvm_root::get(), "uvm_test_top", "cfg" );
  uvm_config_db #(config) :: get( uvm_root::get(), "uvm_test_top", "cfg", cfg );
end
.
.
.
endmodule : assertions

And it is working fine. I want the assertion module to be reused.
Is there any other best method to achieve this, considering the reuse-ability of the assertions module ???

In reply to BHEEMA THANGAVELU:

It might help to show what might change if the assertion module was re-used.

In reply to BHEEMA THANGAVELU:

I do not see a problem regarding the configuration object when you are re-using the assertion module. Of course you have to follow the name rules you have defined. I see the problem more regading the interface signals/variables. I’d recommend to use the generic interface approach in the assertion module. The code looks like this:
module assertions(interface if);
logic data;
data = if.x;
endmodule
This means you can connect to any interface which has variable x. The name of the interface is not relevant.

In reply to dave_59:
Lets say, I have a variable ‘STATE’ in the configuration object. It is not possible to get the STATE information from interface, so I will be using the config object to check the value of STATE and depending on this value, only a certain set of assertions are checked. Similarly. I have many such checks depending on other variables.
If I reuse the assertion module in another test-bench environment, the config object may not be similar to the one which I have in my present environment. How to minimise this dependency?

In reply to chr_sue:
I’m already using the generic interface signals as you can see the port list of my assertion module, along with that I need the config information to enable/disable some set of assertions.