Argument name 'req' for Virtual method in subclass doesn't match the argument

I am trying to functional coverage for APB protocol, and this error occurred
Argument name ‘req’ for Virtual method in subclass doesn’t match the argument

Here snippet of this code,

class apb_coverage extends uvm_subscriber#(apb_master_items);
apb_master_items item_h;

function void write (apb_master_items req);
item_h=req;
cg_apb.sample();
endfunction: write

Kindly help to resolve this error

In reply to CHANDANI B KUKADIA:

Try via ::


function void write (apb_master_items t ); // Arg. name is 't' ALWAYS for uvm_subscriber !!
 ....
endfunction

In reply to CHANDANI B KUKADIA:
SystemVerilog requires that the complete prototype matches when you extend a virtual method. That includes argument names because you are allowed to pass arguments by name instead of positional. write() is a virtual method in uvm_subscriber.

Thanks sir, it works properly and helps me a lot.

And one more question here is,

I have done connection like this,

m_agent_h.m_mon_h.ap.connect(cov_h.analysis_export);

But, I got functional coverage 0%.

And where should I call the write method (virtual method)?

How can I solve these 2 errors?

In reply to CHANDANI B KUKADIA:
See this seminar on monitors and scoreboards.