# Can we set a config db in sequence body() method and get it in scoreboard?

**URL:** <https://verificationacademy.com/forums/t/can-we-set-a-config-db-in-sequence-body-method-and-get-it-in-scoreboard/37424>\
**Category:** UVM\
**Tags:** UVM, uvm\_config\_db-get, uvm\_config\_db\
**Created:** [April 10, 2020, 4:18pm UTC](https://verificationacademy.com/forums/t/can-we-set-a-config-db-in-sequence-body-method-and-get-it-in-scoreboard/37424 "2020-04-10T16:18:40Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Subhra\_Bera](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/subhra_bera/32/3838_2.png) [@Subhra\_Bera](https://verificationacademy.com/forums/u/Subhra_Bera)\
**Post date:** [April 11, 2020, 9:07am UTC](https://verificationacademy.com/forums/t/can-we-set-a-config-db-in-sequence-body-method-and-get-it-in-scoreboard/37424/3 "2020-04-11T09:07:05Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/can-we-set-a-config-db-in-sequence-body-method-and-get-it-in-scoreboard/37424/2):_

Could you please give an example? I have tried in this way,

```verilog
class mem_sequence extends uvm_sequence#(mem_seq_item);
   
  `uvm_object_utils(mem_sequence)
    
  //Constructor
  function new(string name = "mem_sequence");
    super.new(name);
  endfunction
   
  virtual task body();
 
 req = mem_seq_item::type_id::create("req"); //create the req (seq item)
 uvm_config_db#(mem_seq_item)::set(null,"uvm_test_top.*","user_config",this.req); //set method                                                   
    wait_for_grant(); //wait for grant
    assert(req.randomize()); //randomize the req                   
    send_request(req); //send req to driver
    wait_for_item_done(); //wait for item done from driver
    get_response(rsp); //get response from driver
 
  endtask
endclass

```

And in scoreboard tried to get like this:

```verilog

task run_phase(uvm_phase phase);
if(!(uvm_config_db#(mem_seq_item)::get(this,"","user_config",req1) )
 `uvm_fatal(get_full_name(),{"Did not get the user Config"})
endtask

```

After you mentioned about uvm\_event\_pool I have looked into it did not understand how to incorporate that concept in my code. As per my understanding of uvm\_event\_pool we will create and event as soon as the sequence generates and in scoreboard we will for that event. As soon as we get that event our scoreboard run\_phase will continue. Is this understanding correct? Correct me if I am wrong.

---

_[View the full topic](https://verificationacademy.com/forums/t/can-we-set-a-config-db-in-sequence-body-method-and-get-it-in-scoreboard/37424)._
