# Error message : can not find the member in the class

**URL:** <https://verificationacademy.com/forums/t/error-message-can-not-find-the-member-in-the-class/34896>\
**Category:** UVM\
**Tags:** UVM\
**Created:** [August 21, 2018, 4:09pm UTC](https://verificationacademy.com/forums/t/error-message-can-not-find-the-member-in-the-class/34896 "2018-08-21T16:09:29Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![peter1](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/peter1/32/1304_2.png) [@peter1](https://verificationacademy.com/forums/u/peter1)\
**Post date:** [August 21, 2018, 11:26pm UTC](https://verificationacademy.com/forums/t/error-message-can-not-find-the-member-in-the-class/34896/3 "2018-08-21T23:26:43Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/error-message-can-not-find-the-member-in-the-class/34896/2):_

> _In reply to [peter](https://verificationacademy.com/forums/t/error-message-can-not-find-the-member-in-the-class/34896/2):_  
> Your problem is you extended **uvm\_driver** without specifying a parameter (mem\_seq\_item) for **REQ**.

Thanks Dave, i fixed the code. it worked! But , addr ,wr\_en, rd\_en, wdata ,rdata are unknown,  
i used req.randomize() in body task. why the addr,wr\_en, rd\_en, wdata ,rdata can not be randomized?  
Here is new driver code

```verilog

 `define DRIV_IF pointer_to_interface.DRIVER.driver_cb
class mem_driver extends uvm_driver #(mem_seq_item);
   `uvm_component_utils(mem_driver);

 virtual mem_if pointer_to_interface;
   
 function new (string name, uvm_component parent);
      super.new(name,parent);

 endfunction : new

 virtual function void build_phase(uvm_phase phase);
    super.build_phase(phase);
    
	if(!uvm_config_db #(virtual mem_if)::get(null, "*","pointer_to_interface", pointer_to_interface))
        $fatal("Failed to get BFM");
		
 endfunction : build_phase
   

 task run_phase(uvm_phase phase);

      phase.raise_objection(this);
    forever begin
        seq_item_port.get_next_item(req);
      drive();
        seq_item_port.item_done();
    end

      phase.drop_objection(this);
 endtask : run_phase

   
  virtual task drive();
    `DRIV_IF.wr_en <= 0;
    `DRIV_IF.rd_en <= 0;
    @(posedge pointer_to_interface.DRIVER.clk);
        `DRIV_IF.addr <= req.addr;
      if(req.wr_en) begin
        `DRIV_IF.wr_en <= req.wr_en;
        `DRIV_IF.wdata <= req.wdata;

    @(posedge pointer_to_interface.DRIVER.clk);
      //end
    if(req.rd_en) begin
        `DRIV_IF.rd_en <= req.rd_en;
    @(posedge pointer_to_interface.DRIVER.clk);
       `DRIV_IF.rd_en <= 0;
    @(posedge pointer_to_interface.DRIVER.clk);
        req.rdata = `DRIV_IF.rdata;
      end   
  endtask : drive  
endclass

```

---

_[View the full topic](https://verificationacademy.com/forums/t/error-message-can-not-find-the-member-in-the-class/34896)._
