when I am trying to send the data from monitor to subscriber IRUN tool gives me an error like below
function void write(my_transaction tr);
virtual method ‘my_subscriber::write’ formal argument name does not match base class uvm_subscriber
I have check with base Examples given in UVM-1.1d and UVM-cookbook also Iam practising pretty much same code i don’t know why it gives me error, can any one please resolve the error
I am also facing the same issue. Somebody please tell me where I am going wrong
Please refer the example below
class my_coverage extends uvm_subscriber #(my_cov_item);
`uvm_component_utils(my_coverage)
function new (string name, uvm_component parent);
super.new(name, parent);
endfunction : new
function void write (my_cov_item t);
$display("my_cov_item obtained by my_coverage");
endfunction : new
endclass : my_coverage
The write function is pure virtual function. Pure means there is no implementation and you have to provide an implementation. For this reason you have to follow the naming of the base class.
In reply to sriram pantla:
The write function is pure virtual function. Pure means there is no implementation and you have to provide an implementation. For this reason you have to follow the naming of the base class.
Yes, this is right, in my example code above, I used “t” as argument to write() function, but was not doing so in my actual code. Thanks